diff --git a/src/plugins/Relationship.as b/src/plugins/Relationship.as index 1dd84a0..e5c7adc 100644 --- a/src/plugins/Relationship.as +++ b/src/plugins/Relationship.as @@ -324,7 +324,7 @@ package plugins { var node:NodeViewController = new NodeViewController(new NodeDataObject(children[idx].node, NodeType.NODE, ConnectionController.mainConnection)); parent.addChildNode(node); var nodeCachedData:Object; - if (mapDataCache && mapDataCache['children'].hasOwnProperty(node.nodeData.drupalID)) { + if (mapDataCache && mapDataCache.hasOwnProperty('children') && mapDataCache['children'].hasOwnProperty(node.nodeData.drupalID)) { nodeCachedData = mapDataCache['children'][node.nodeData.drupalID] as Object; nodeCachedData['node'] = node; cachedOrder.push(nodeCachedData); @@ -341,8 +341,8 @@ package plugins { // Fix order from cache parent.getChildNodeAll().removeAll(); - for (idx in cachedOrder) {parent.getChildNodeAll().addItem(cachedOrder[idx]['node']);} - for (idx in notCached) {parent.getChildNodeAll().addItem(notCached[idx]);} + for (idx in cachedOrder) {parent.getChildNodeAll().addItem(cachedOrder[idx]['node']);} + for (idx in notCached) {parent.getChildNodeAll().addItem(notCached[idx]);} }