Skip to content

Commit

Permalink
Add nonnull after checking for null
Browse files Browse the repository at this point in the history
  • Loading branch information
Tempo-anon committed Sep 19, 2024
1 parent e83a1d5 commit 5156990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/field/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const autotomizedTag = this.getTag(AutotomizedTag);
let weightRemoved = 0;
if (!Utils.isNullOrUndefined(autotomizedTag)) {
weightRemoved = 100 * autotomizedTag.autotomizeCount;
weightRemoved = 100 * autotomizedTag!.autotomizeCount;
}
const minWeight = 0.1;
const weight = new Utils.NumberHolder(this.species.weight - weightRemoved);
Expand Down

0 comments on commit 5156990

Please sign in to comment.