mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
Sort callback should return 0 if values are equal
Fixes: "The callback [:381] provided to sort [:381] should return 0 if the compared values are equal."
This commit is contained in:
parent
cfa2bbd3d4
commit
fc9f0d8392
1 changed files with 2 additions and 2 deletions
|
@ -378,8 +378,8 @@ BlazeComponent.extendComponent({
|
|||
new Date(card.dueAt.getTime() + 36e5),
|
||||
);
|
||||
});
|
||||
events.sort(function(first, second) {
|
||||
return first.id > second.id ? 1 : -1;
|
||||
events.sort((first, second) => {
|
||||
return first.id === second.id ? 0 : first.id > second.id ? 1 : -1;
|
||||
});
|
||||
callback(events);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue