Permalink
Browse files

MINOR Added check for presence of origData in LeftAndMain event handl…

…er javascript

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92678 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent d90d672 commit 3725a98da32bad3663cbe184066846276d6cd08b @chillu chillu committed Nov 21, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 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);
+ }
}
}

0 comments on commit 3725a98

Please sign in to comment.