Skip to content

Commit

Permalink
BUGFIX #6089 Avoid javascript error when "Allow drag & drop reorderin…
Browse files Browse the repository at this point in the history
…g" enabled, and attempt to drag a file from one folder to another is performed (from r111932)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112945 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
Sam Minnee committed Oct 19, 2010
1 parent be40e11 commit c298990
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions javascript/tree/tree.js
Expand Up @@ -143,6 +143,8 @@ Tree.prototype = {
* If 'before' is specified, then it will be inserted before that.
*/
appendTreeNode : function(child, before) {
if(!child) return;

// Remove from the old parent node - this will ensure that the classes of the old tree
// item are updated accordingly
if(child && child.parentTreeNode) {
Expand Down

0 comments on commit c298990

Please sign in to comment.