mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
refactor(core): otherPromise in wrapInstance shouldn't check for error
This commit is contained in:
@@ -290,8 +290,10 @@ export function wrapInstance(pluginObj: any, methodName: string, opts: any = {})
|
||||
|
||||
return getPromise((resolve: Function, reject: Function) => {
|
||||
let result = callInstance(pluginObj, methodName, args, opts, resolve, reject);
|
||||
if (result && !result.error) {
|
||||
if (result && !!result.then) {
|
||||
result.then(resolve, reject);
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user