Skip to content

Commit 28fc2a0

Browse files
committed
Fix call to isAllowed
Referring to the discussion about commit c1d6a86, isAllowed should be called with the currentItem instead of the item's placeholder, which is pretty useless.
1 parent 552453c commit 28fc2a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

jquery.mjs.nestedSortable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@
403403
// Is the root protected?
404404
// Are we trying to nest under a no-nest?
405405
// Are we nesting too deep?
406-
if (!o.isAllowed(this.placeholder, parentItem) ||
406+
if (!o.isAllowed(this.currentItem, parentItem) ||
407407
parentItem && parentItem.hasClass(o.disableNesting) ||
408408
o.protectRoot && (parentItem == null && !isRoot || isRoot && level > 1)) {
409409
this.placeholder.addClass(o.errorClass);

0 commit comments

Comments
 (0)