This commit is contained in:
Max Lynch
2015-11-30 11:09:50 -06:00
parent 226c182039
commit b6e612209a
17 changed files with 155 additions and 42 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ exports.wrap = function (pluginObj, methodName, opts) {
}
else if (typeof opts.successIndex !== 'undefined' || typeof opts.errorIndex !== 'undefined') {
// If we've specified a success/error index
args[opts.successIndex] = resolve;
args[opts.errorIndex] = reject;
args.splice(opts.successIndex, resolve);
args.splice(opts.errorIndex, reject);
}
else {
// Otherwise, let's tack them on to the end of the argument list