Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 931399b

Browse files
committed
Improved ui.item.sortable.moved check, to properly handle 'falsy' values.
1 parent b82aed9 commit 931399b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sortable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ angular.module('ui.sortable', [])
6060
callbacks.receive = function(e, ui) {
6161
ui.item.sortable.relocate = true;
6262
// if the item still exists (it has not been cancelled)
63-
if(ui.item.sortable.moved) {
63+
if('moved' in ui.item.sortable) {
6464
// added item to array into correct position and set up flag
6565
ngModel.$modelValue.splice(ui.item.index(), 0, ui.item.sortable.moved);
6666
}

0 commit comments

Comments
 (0)