From fc9f0d83921a526ca81c73381ac93cfcb9bb6fd9 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Sun, 24 May 2020 12:53:15 +0200 Subject: 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." --- client/components/boards/boardBody.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index 78418f2a..e70faa49 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -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); }, -- cgit v1.2.3-1-g7c22