mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
Fixed broken test for display name
This commit is contained in:
parent
16c38634b6
commit
7179a30827
1 changed files with 3 additions and 2 deletions
|
|
@ -92,14 +92,15 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
|
|||
}
|
||||
|
||||
$scope.choosePet = function(egg, potion){
|
||||
var pet = potion + " " + egg;
|
||||
var petDisplayName = potion + " " + egg,
|
||||
pet = egg + '-' + potion;
|
||||
|
||||
// Feeding Pet
|
||||
if ($scope.selectedFood) {
|
||||
var food = $scope.selectedFood
|
||||
if (food.key == 'Saddle') {
|
||||
if (!$window.confirm('Saddle ' + pet + '?')) return;
|
||||
} else if (!$window.confirm('Feed ' + pet + ' '+ food.article + food.text + '?')) {
|
||||
} else if (!$window.confirm('Feed ' + petDisplayName + ' '+ food.article + food.text + '?')) {
|
||||
return;
|
||||
}
|
||||
User.user.ops.feed({params:{pet: pet, food: food.key}});
|
||||
|
|
|
|||
Loading…
Reference in a new issue