From 3725a98da32bad3663cbe184066846276d6cd08b Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 02:39:22 +0000 Subject: [PATCH] MINOR Added check for presence of origData in LeftAndMain event handler javascript git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92678 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/LeftAndMain_left.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/javascript/LeftAndMain_left.js b/javascript/LeftAndMain_left.js index be2b23b2..9adb7934 100755 --- a/javascript/LeftAndMain_left.js +++ b/javascript/LeftAndMain_left.js @@ -378,8 +378,10 @@ SiteTree.prototype = { if(className) this.setNodeIcon(id, className); } else { - var node = this.getTreeNodeByIdx(origData.id); - if(node && node.parentTreeNode) node.parentTreeNode.removeTreeNode(node); + if(typeof eventData.origData != 'undefined') { + var node = this.getTreeNodeByIdx(eventData.origData.ID); + if(node && node.parentTreeNode) node.parentTreeNode.removeTreeNode(node); + } } }