Skip to content

Commit 434e9c9

Browse files
authored
Merge pull request #91 from muchnameless/master
fix(Pet): check if data.petStats exists
2 parents 43ddaa6 + cc864ad commit 434e9c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/structures/Pet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Pet {
2424
* @type {boolean}
2525
*/
2626
this.active = data.currentPet === name.toUpperCase();
27-
const stats = data.petStats[name.toUpperCase()];
27+
const stats = data.petStats && data.petStats[name.toUpperCase()];
2828
/**
2929
* Stats of the pet, if any
3030
* @type {object}

0 commit comments

Comments
 (0)