refactor(core): otherPromise in wrapInstance shouldn't check for error

This commit is contained in:
Ibby Hadeed 2017-05-17 10:47:39 -04:00
parent 8aca6718e1
commit a7c62de389

View File

@ -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();
}
});