diff --git a/ical.js b/ical.js index 6cbfb84..e9098df 100755 --- a/ical.js +++ b/ical.js @@ -165,12 +165,19 @@ } var par = stack.pop() - + + // @deprecated, nodes will be stored in the lowercased `type` array if (curr.uid) par[curr.uid] = curr else par[Math.random()*100000] = curr // Randomly assign ID : TODO - use true GUID - + // < + + var type = curr.type.toLowerCase(); + if (par[type] == null) + par[type] = []; + + par[type].push(curr); return par }