From 22270fd874c60ca7a282f979e1bf61cfc222c30c Mon Sep 17 00:00:00 2001 From: Andrew Brindamour Date: Sun, 27 Dec 2020 17:12:30 -0800 Subject: [PATCH] Fix issue where "Bounce Back" card was erroneously detected as a back card --- src/Logic/GloomhavenDataService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Logic/GloomhavenDataService.ts b/src/Logic/GloomhavenDataService.ts index 049a37e..9434362 100644 --- a/src/Logic/GloomhavenDataService.ts +++ b/src/Logic/GloomhavenDataService.ts @@ -95,13 +95,13 @@ export class GloomhavenDataService { cardsForCharacter(character: Character) : CharacterAbilityCard[] { return this._cardsForCharacter(character) - .filter((card: any) => !card.image.endsWith("-back.png")) + .filter((card) => card.id != character.abbrev.toLowerCase() + "-back") } backCardForCharacter(character: Character) : CharacterAbilityCard { return this._cardsForCharacter(character) - .filter((card: any) => card.image.endsWith("-back.png")) + .filter((card) => card.id == character.abbrev.toLowerCase() + "-back") [0] }