mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
refactor(modal): Remove unnecessary ternary
This commit is contained in:
@@ -115,7 +115,7 @@ habitrpg.controller("InventoryCtrl",
|
|||||||
var potName = Content.hatchingPotions[potion.key].text();
|
var potName = Content.hatchingPotions[potion.key].text();
|
||||||
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
|
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
|
||||||
|
|
||||||
var userHasPet = (user.items.pets[egg.key + '-' + potion.key] > 0) ? true:false;
|
var userHasPet = user.items.pets[egg.key + '-' + potion.key] > 0;
|
||||||
|
|
||||||
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
|
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user