Skip to content

Commit

Permalink
Merge pull request #479 from gmmatt/dev
Browse files Browse the repository at this point in the history
Fix for deck app sorting
  • Loading branch information
Algor0113 authored Oct 30, 2024
2 parents c5a39c9 + b15d18c commit 20ed1b4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions module/cards/torgeternityDeck.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 20ed1b4

Please sign in to comment.