Fix: pet tests

This commit is contained in:
Xaz16
2019-12-15 22:00:34 +03:00
parent dec0488b08
commit 8b780eaf0d
2 changed files with 7 additions and 7 deletions

View File

@@ -46,7 +46,7 @@ export default function hatch (user, req = {}) {
};
user.items.eggs = {
...user.items.eggs,
[egg]: user.items.eggs - 1,
[egg]: Number.isInteger(user.items.eggs) ? user.items.eggs - 1 : 0,
};
user.items.hatchingPotions[hatchingPotion] -= 1;
if (user.markModified) {