mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
check pet is hatchable before highlighting (#10797)
This commit is contained in:
parent
a48a6a292d
commit
e9eddec0c4
1 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue