guildinfo: wrap conditions

This commit is contained in:
Cynthia Foxwell 2024-08-19 22:26:39 -06:00
parent 9c2419c796
commit fc19103bdd

View file

@ -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) {