From 8f75b84b42ce4f881c159760a57a18f0f291052c Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sat, 7 Dec 2013 12:17:03 -0700 Subject: [PATCH] mounts: bugfix to drop notif for food --- public/js/controllers/notificationCtrl.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/js/controllers/notificationCtrl.js b/public/js/controllers/notificationCtrl.js index 759fd267b5..d1ddbda530 100644 --- a/public/js/controllers/notificationCtrl.js +++ b/public/js/controllers/notificationCtrl.js @@ -31,7 +31,9 @@ habitrpg.controller('NotificationCtrl', $rootScope.$watch('user._tmp.drop', function(after, before){ // won't work when getting the same item twice? if (after == before || !after) return; - var type = after.type === 'HatchingPotion' ? 'hatchingPotions' : (after.type.toLowerCase() + 's') + var type = (after.type == 'Food') ? 'food' : + (after.type == 'HatchingPotion') ? 'hatchingPotions' : // can we use camelcase and remove this line? + (after.type.toLowerCase() + 's'); if(!User.user.items[type][after.name]){ User.user.items[type][after.name] = 0; }