diff --git a/src/field/trainer.ts b/src/field/trainer.ts index 3469eef8255..b1d0263f604 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -431,9 +431,9 @@ export default class Trainer extends Phaser.GameObjects.Container { retry = true; } - if (retry && (attempt || 0) < 10) { + if (retry && (attempt ?? 0) < 10) { console.log("Rerolling party member..."); - ret = this.genNewPartyMemberSpecies(level, strength, (attempt || 0) + 1); + ret = this.genNewPartyMemberSpecies(level, strength, (attempt ?? 0) + 1); } return ret;