Skip to content

Commit 7b189ac

Browse files
committed
Fix error callback is not a function
The error was triggered when using the rest api client without the callback parameter and the request failed
1 parent d6f3142 commit 7b189ac

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/ClientBase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class ClientBase extends Base {
251251
const error = handleError(err, obj);
252252
if (!_.isNil(error)) {
253253
reject(error);
254-
callback(error, null);
254+
cb(error, null);
255255
} else if (obj.data) {
256256
const ObjFunc = this._stringToClass(model);
257257
// resolve(new ObjFunc(this, obj.data));

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cryptomarket",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "The CryptoMarket for Node.js",
55
"homepage": "https://www.cryptomkt.com",
66
"main": "./index.js",

0 commit comments

Comments
 (0)