mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 01:19:36 +08:00
chore(): fix plugin callback order comment
This commit is contained in:
parent
0d57ef8852
commit
6fcba5cc3f
@ -38,7 +38,7 @@ function callCordovaPlugin(pluginObj:any, methodName:string, args:any[], opts:an
|
|||||||
|
|
||||||
// If the plugin method expects myMethod(success, err, options)
|
// If the plugin method expects myMethod(success, err, options)
|
||||||
if(opts.callbackOrder == 'reverse') {
|
if(opts.callbackOrder == 'reverse') {
|
||||||
// Get those arguments in the order [reject, resolve, ...restOfArgs]
|
// Get those arguments in the order [resolve, reject, ...restOfArgs]
|
||||||
args.unshift(reject);
|
args.unshift(reject);
|
||||||
args.unshift(resolve);
|
args.unshift(resolve);
|
||||||
} else if(typeof opts.successIndex !== 'undefined' || typeof opts.errorIndex !== 'undefined') {
|
} else if(typeof opts.successIndex !== 'undefined' || typeof opts.errorIndex !== 'undefined') {
|
||||||
|
Loading…
Reference in New Issue
Block a user