check pet is hatchable before highlighting (#10797)

This commit is contained in:
Kirsty 2018-11-02 16:16:11 +00:00 committed by Matteo Pagliazzi
parent a48a6a292d
commit e9eddec0c4

View file

@ -373,9 +373,12 @@ export default {
if (potion === null || egg === null)
return false;
let petKey = `${egg.key}-${potion.key}`;
const petKey = `${egg.key}-${potion.key}`;
if (!this.content.petInfo[petKey])
const petInfo = this.content.petInfo[petKey];
// Check pet exists and is hatchable
if (!petInfo || !petInfo.potion)
return false;
return !this.userHasPet(potion.key, egg.key);