From a7c62de38996095180a3cd6ac7ec3b8ee3626c1a Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Wed, 17 May 2017 10:47:39 -0400 Subject: [PATCH] refactor(core): otherPromise in wrapInstance shouldn't check for error --- src/@ionic-native/core/plugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/@ionic-native/core/plugin.ts b/src/@ionic-native/core/plugin.ts index f369ba60d..362c72255 100644 --- a/src/@ionic-native/core/plugin.ts +++ b/src/@ionic-native/core/plugin.ts @@ -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(); } });