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
This commit is contained in:
Ingo Schommer 2009-11-21 02:39:22 +00:00
parent d90d672158
commit 3725a98da3

View File

@ -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);
}
}
}