mirror of
https://github.com/HabitRPG/habitica.git
synced 2026-04-21 11:28:35 -05:00
check pet is hatchable before highlighting (#10797)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user