From d23e5ce91a65d59529163b34dbcf1b11ec1775db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Matte?= Date: Tue, 19 Sep 2023 16:26:37 -0400 Subject: [PATCH] Switch comparaison --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8099576..e425a8a 100644 --- a/index.js +++ b/index.js @@ -13,8 +13,8 @@ const sortby = (properties) => (a, b) => { const collator = new Intl.Collator('en', { numeric: true, sensitivity: 'base' }) const compare = collator.compare(a[property], b[property]) - if (compare > 0) return -order if (compare < 0) return order + if (compare > 0) return -order }