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