Switch comparaison

master
Frédéric Matte 2023-09-19 16:26:37 -04:00
parent 8cd5c884e0
commit d23e5ce91a
1 changed files with 1 additions and 1 deletions

View File

@ -13,8 +13,8 @@ const sortby = (properties) => (a, b) => {
const collator = new Intl.Collator('en', { numeric: true, sensitivity: 'base' }) const collator = new Intl.Collator('en', { numeric: true, sensitivity: 'base' })
const compare = collator.compare(a[property], b[property]) const compare = collator.compare(a[property], b[property])
if (compare > 0) return -order
if (compare < 0) return order if (compare < 0) return order
if (compare > 0) return -order
} }