mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix(modals): Rehatch pets
Corrects an issue with #6281 that would cause the pet hatching modal to fail to display if the pet had a value of -1 (i.e. raised to a mount and not yet re-hatched).
This commit is contained in:
@@ -115,7 +115,7 @@ habitrpg.controller("InventoryCtrl",
|
||||
var potName = Content.hatchingPotions[potion.key].text();
|
||||
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
|
||||
|
||||
var userHasPet = user.items.pets[egg.key + '-' + potion.key];
|
||||
var userHasPet = (user.items.pets[egg.key + '-' + potion.key] > 0) ? true:false;
|
||||
|
||||
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user