Skip to content

Commit f4da035

Browse files
author
Aaron O'Mullan
committed
Only support single argument callbacks
makeNodeResolver was returning lists when multiple arguments were given to the callback This broke some of our dynobox behavior after upgrading to node-etcd@2.05+
1 parent 0becb74 commit f4da035

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ function qMethod(method) {
3737
var args = _.toArray(arguments);
3838

3939
// Add callback
40-
args.push(d.makeNodeResolver());
40+
args.push(function(err, value) {
41+
if(err) return d.reject(err);
42+
return d.resolve(value);
43+
});
4144

4245
// Call function
4346
method.apply(this, args);

0 commit comments

Comments
 (0)