From b15d18c4d6196b9ce6c6dae138711cdc2683f21e Mon Sep 17 00:00:00 2001 From: Algor0113 <80172941+Algor0113@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:35:12 +0100 Subject: [PATCH] Fix for deck app sorting --- module/cards/torgeternityDeck.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/module/cards/torgeternityDeck.js b/module/cards/torgeternityDeck.js index 9f62caa3..c84be7f9 100644 --- a/module/cards/torgeternityDeck.js +++ b/module/cards/torgeternityDeck.js @@ -25,14 +25,10 @@ export default class torgeternityDeck extends CardsPile { * * @inheritdoc */ - async getData(data) { - data = await super.getData(); - - for (const card of data?.cards) { - card.typeLoc = game.i18n.localize(`torgeternity.cardTypes.${card.type}`); - } - - return data; + async getData() { + const context = await super.getData(); + context.cards.sort((a, b) => a.sort - b.sort); + return context; } /**