Skip to content

Commit

Permalink
fix(connection): handle no cb correctly for connection helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Oct 26, 2017
1 parent 62e2ff6 commit a51e1f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function _wrapConnHelper(fn) {
return function() {
var _this = this;
var Promise = PromiseProvider.get();
var cb = arguments.length > 0 ? arguments[arguments.length - 1] : [];
var cb = arguments.length > 0 ? arguments[arguments.length - 1] : null;
var argsWithoutCb = typeof cb === 'function' ?
Array.prototype.slice.call(arguments, 0, arguments.length - 1) :
Array.prototype.slice.call(arguments);
Expand Down

0 comments on commit a51e1f5

Please sign in to comment.