Skip to content

Commit fb3abe8

Browse files
committed
Merge branch 'dev' of github.com:RubaXa/Sortable into dev
2 parents 705b3ed + dce3eb2 commit fb3abe8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sortable.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,10 @@
949949
*/
950950
function _index(/**HTMLElement*/el) {
951951
var index = 0;
952-
while (el && (el = el.previousElementSibling) && (el.nodeName.toUpperCase() !== 'TEMPLATE')) {
953-
index++;
952+
while (el && (el = el.previousElementSibling)) {
953+
if (el.nodeName.toUpperCase() !== 'TEMPLATE') {
954+
index++;
955+
}
954956
}
955957
return index;
956958
}

0 commit comments

Comments
 (0)