BUGFIX #6089 Avoid javascript error when "Allow drag & drop reordering" enabled, and attempt to drag a file from one folder to another is performed

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111932 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-10-12 01:29:56 +00:00 committed by Sam Minnee
parent 03f107ef35
commit ca53fbd49f

View File

@ -147,6 +147,8 @@ Tree.prototype = {
* If 'before' is specified, then it will be inserted before that. * If 'before' is specified, then it will be inserted before that.
*/ */
appendTreeNode : function(child, before) { appendTreeNode : function(child, before) {
if(!child) return;
// Remove from the old parent node - this will ensure that the classes of the old tree // Remove from the old parent node - this will ensure that the classes of the old tree
// item are updated accordingly // item are updated accordingly
if(child.parentTreeNode) { if(child.parentTreeNode) {