From 7830c73e6047ab8ec1322c4a56ed6a450bfb11e6 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 27 Apr 2023 16:57:09 -0300 Subject: data: make sortByConditions return sorted array This wasn't causing any bugs within the codebase but it should be consistent with the rest of the sort functions anyway. --- src/util/wiki-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js index 2a8f12ca..89c621c5 100644 --- a/src/util/wiki-data.js +++ b/src/util/wiki-data.js @@ -260,7 +260,7 @@ export function sortByPositionInFlashAct(data) { // set of arbitrary given conditions is true first. If no conditions are met // for a given item, it's moved over to the end! export function sortByConditions(data, conditions) { - data.sort((a, b) => { + return data.sort((a, b) => { const ai = conditions.findIndex((f) => f(a)); const bi = conditions.findIndex((f) => f(b)); -- cgit 1.3.0-6-gf8a5