Skip to content

Commit cc864ad

Browse files
committed
fix(Pet): check if data.petStats exists
1 parent 43ddaa6 commit cc864ad

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)