Fix mounts/minions percentages always showing as N/A%

This commit is contained in:
Adam Chance 2022-10-09 17:26:35 +01:00
parent 25905928e9
commit 56e8d7e030

View file

@ -442,10 +442,10 @@ class CardCreator {
let minionsPercentage = "N/A" let minionsPercentage = "N/A"
let mountsPercentage = "N/A" let mountsPercentage = "N/A"
if (Minions != null) { if (Minions != null) {
const minionsPercentage = Math.ceil(((Minions.length ?? 0) / this.minionCount) * 100); minionsPercentage = Math.ceil(((Minions.length ?? 0) / this.minionCount) * 100);
} }
if (Mounts != null) { if (Mounts != null) {
const mountsPercentage = Math.ceil(((Mounts.length ?? 0) / this.mountCount) * 100); mountsPercentage = Math.ceil(((Mounts.length ?? 0) / this.mountCount) * 100);
} }
ctx.font = smed; ctx.font = smed;