From fc19103bdda471d999308d96a0a9340ab2a17361 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Mon, 19 Aug 2024 22:26:39 -0600 Subject: [PATCH] guildinfo: wrap conditions --- src/modules/utility/guildinfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/utility/guildinfo.js b/src/modules/utility/guildinfo.js index de5a7aa..8929121 100644 --- a/src/modules/utility/guildinfo.js +++ b/src/modules/utility/guildinfo.js @@ -79,7 +79,7 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) { const games = await Promise.all( clan.game_ids - .sort((a, b) => clan.game_activity[b]?.activity_score ?? 0 - clan.game_activity[a]?.activity_score ?? 0) + .sort((a, b) => (clan.game_activity[b]?.activity_score ?? 0) - (clan.game_activity[a]?.activity_score ?? 0)) .map(async (id) => { let game = Games.find((x) => x.id == id); if (!game) {