Skip to content

Commit

Permalink
Merge pull request #91 from muchnameless/master
Browse files Browse the repository at this point in the history
fix(Pet): check if data.petStats exists
  • Loading branch information
StavZ authored Feb 24, 2021
2 parents 43ddaa6 + cc864ad commit 434e9c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/structures/Pet.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Pet {
* @type {boolean}
*/
this.active = data.currentPet === name.toUpperCase();
const stats = data.petStats[name.toUpperCase()];
const stats = data.petStats && data.petStats[name.toUpperCase()];
/**
* Stats of the pet, if any
* @type {object}
Expand Down

0 comments on commit 434e9c9

Please sign in to comment.