Skip to content

Commit fbbbfbc

Browse files
committed
fixed: empty connected llst
When two connected lists are used and one is empty, "item" is undefined/null; this change returns when its em is null and calls _superApply before.
1 parent 219bea8 commit fbbbfbc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jquery.ui.sortable-animation.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,15 @@
7171
return this._superApply(arguments);
7272
}
7373

74+
// call original _rearrange() at first, before access to item, which may be undefined
75+
this._superApply(arguments);
76+
if (item == null) { return; }
77+
7478
$item = $(item.item[0]);
7579
// if moved up, then move item up to its height,
7680
// if moved down, then move item down
7781
offset = (this.direction == 'up' ? '' : '-') + ($item[axis == 'x' ? 'width' : 'height']()) + 'px';
7882

79-
// call original _rearrange() at first
80-
this._superApply(arguments);
8183

8284
// prepare starting css props
8385
if (use_css_animation) {

0 commit comments

Comments
 (0)