Skip to content

Commit

Permalink
Merge pull request kriskowal#733 from b12consulting/DerekDomino-patch-1
Browse files Browse the repository at this point in the history
Merge change to improve error message in denodeify
  • Loading branch information
kriskowal committed Sep 30, 2015
2 parents 75058c0 + 51d1dbd commit a8ce0f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions q.js
Original file line number Diff line number Diff line change
Expand Up @@ -1918,6 +1918,9 @@ Promise.prototype.nfcall = function (/*...args*/) {
*/
Q.nfbind =
Q.denodeify = function (callback /*...args*/) {
if (callback === undefined) {
throw new Error('Q Cannot wrap an undefined function');
}
var baseArgs = array_slice(arguments, 1);
return function () {
var nodeArgs = baseArgs.concat(array_slice(arguments));
Expand Down

0 comments on commit a8ce0f1

Please sign in to comment.