adjust mimo percent to be 0 if user has none

This commit is contained in:
ArcaneDisgea 2021-05-28 15:19:49 -04:00
parent 669105e4c5
commit cd6f23bc5c

View file

@ -357,12 +357,12 @@ class CardCreator {
} }
// Minion & Mount percentages // Minion & Mount percentages
var mountsPct = '??'; var mountsPct = '0';
if (data.Mounts !== null) { if (data.Mounts !== null) {
mountsPct = Math.ceil((data.Mounts.length / this.countMount) * 100); mountsPct = Math.ceil((data.Mounts.length / this.countMount) * 100);
} }
var minionsPct = '??'; var minionsPct = '0';
if (data.Minions !== null) { if (data.Minions !== null) {
minionsPct = Math.ceil((data.Minions.length / this.countMinion) * 100); minionsPct = Math.ceil((data.Minions.length / this.countMinion) * 100);
} }