Browse Source

Updated Sortable.js to catch empty "order" array

If I don't set up the Store Get function (because I'm only using Set) fully, I get the error "TypeError: order is undefined" at line 1057 of Sortable.js.  (I don't want to change the order of the original list so I don't have a return statement, or return null.)  This fixes that error message.
pull/1353/head
furnace 6 years ago committed by GitHub
parent
commit
eb04d753bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Sortable.js

2
Sortable.js

@ -1117,12 +1117,14 @@
} }
}, this); }, this);
if (typeof order !== 'undefined') {
order.forEach(function (id) { order.forEach(function (id) {
if (items[id]) { if (items[id]) {
rootEl.removeChild(items[id]); rootEl.removeChild(items[id]);
rootEl.appendChild(items[id]); rootEl.appendChild(items[id]);
} }
}); });
}
}, },

Loading…
Cancel
Save