diff --git a/.gitignore b/.gitignore index a5670e901b477..c30a613f8b2dd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # You shouldn't edit these files, as they're generated automatically from ccxt.js by build scripts. # Please read https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#multilanguage-support for details. # +.vscode build/* node_modules/ npm-debug.log diff --git a/js/base/Exchange.js b/js/base/Exchange.js index 8076e82ca9409..5193114d5d731 100644 --- a/js/base/Exchange.js +++ b/js/base/Exchange.js @@ -842,7 +842,7 @@ module.exports = class Exchange { let orderbook = response; for (let i = 0; i < path.length; i++) { let key = (path[i] === '__market__') ? market['id'] : path[i]; - orderbook = (typeof orderbook[key] !== 'undefined') ? orderbook[key] : orderbook; + orderbook = key in orderbook ? orderbook[key] : orderbook; } return orderbook; }