Skip to content

Commit

Permalink
Merge pull request mjsarfatti#47 from fonclub/2.0alpha
Browse files Browse the repository at this point in the history
Fix bug
  • Loading branch information
Matt Parnell committed Mar 8, 2015
2 parents 25e74f6 + 4495125 commit 7a22321
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jquery.mjs.nestedSortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@
.removeClass(this.options.branchClass + " " + this.options.expandedClass)
.addClass(this.options.leafClass);
}

this._clearEmpty(parentItem[0]);
if(typeof parentItem !== 'undefined')
this._clearEmpty(parentItem[0]);
this._trigger("change", event, this._uiHash());
// mjs - if the item is below a sibling and is moved to the right,
// make it a child of that sibling
Expand Down Expand Up @@ -536,8 +536,8 @@
// mjs - otherwise, add it to the bottom of the list.
previousItem.children(o.listType)[0].appendChild(this.placeholder[0]);
}

this._clearEmpty(parentItem[0]);
if(typeof parentItem !== 'undefined')
this._clearEmpty(parentItem[0]);
this._trigger("change", event, this._uiHash());
} else {
this._isAllowed(parentItem, level, level + childLevels);
Expand Down

0 comments on commit 7a22321

Please sign in to comment.