Skip to content

Commit

Permalink
Do not pass non persistent new records when sorting tables by removin…
Browse files Browse the repository at this point in the history
…g non numeric ids
  • Loading branch information
hefan committed Apr 18, 2020
1 parent ff2b06a commit 74cdc64
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Spree.ready(function() {
var idAttr = el.id;
if (idAttr) {
var objId = idAttr.split('_').slice(-1);
positions['positions['+objId+']'] = index + 1;
if (!isNaN(objId)) {
positions['positions['+objId+']'] = index + 1;
}
}
});
Spree.ajax({
Expand Down

0 comments on commit 74cdc64

Please sign in to comment.