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:
Sabe Jones
2015-11-30 16:11:13 -05:00
parent a42c671f1f
commit 3a20455cda

View File

@@ -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}});