From dff2727f858f68bb1c743fee069ffd29c5bba5c1 Mon Sep 17 00:00:00 2001 From: Alexander Corn Date: Sun, 28 Jun 2015 22:16:49 -0400 Subject: [PATCH] Don't fire callback if not provided --- classes/CMarketItem.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/CMarketItem.js b/classes/CMarketItem.js index 5da39e5..6bbf59b 100644 --- a/classes/CMarketItem.js +++ b/classes/CMarketItem.js @@ -124,6 +124,8 @@ CMarketItem.prototype.updatePrice = function(callback) { self.highestBuyOrder = parseInt(body.highest_buy_order, 10); // TODO: The tables? - callback(); + if(callback) { + callback(); + } }); };