From 1803bdb2edbe62fb62514d8394e572f6d077055c Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 2 Jan 2014 21:09:26 -0700 Subject: [PATCH] fix https://github.com/HabitRPG/habitrpg/issues/2073 --- dist/habitrpg-shared.js | 4 ++-- script/index.coffee | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index c50f5bc11a..68578bdfa7 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -11603,10 +11603,10 @@ var process=require("__browserify_process");(function() { user.items.gear[type][item.type] = item.key; message = user.fns.handleTwoHanded(item, type); } - return typeof cb === "function" ? cb({ + return typeof cb === "function" ? cb((message ? { code: 200, message: message - }, user.items) : void 0; + } : null), user.items) : void 0; }, hatch: function(req, cb) { var egg, hatchingPotion, pet, _ref; diff --git a/script/index.coffee b/script/index.coffee index e4eb43f70e..3f222bdafe 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -610,7 +610,7 @@ api.wrap = (user) -> item = content.gear.flat[key] user.items.gear[type][item.type] = item.key message = user.fns.handleTwoHanded(item,type) - cb? {code:200,message}, user.items + cb? (if message then {code:200,message} else null), user.items hatch: (req, cb) -> {egg, hatchingPotion} = req.params