From 6cd97ca0eeb5c6890de18556533565672bef65d5 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Mon, 11 Dec 2017 19:26:41 -0500 Subject: [PATCH] fix(core): fix issue with CordovaFunctionOverride decorator Decorator should not check if the method exists, only if the plugin exists --- src/@ionic-native/core/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@ionic-native/core/plugin.ts b/src/@ionic-native/core/plugin.ts index 4e5e6123a..4118e482e 100644 --- a/src/@ionic-native/core/plugin.ts +++ b/src/@ionic-native/core/plugin.ts @@ -230,7 +230,7 @@ export function wrapEventObservable(event: string, element: any = window): Obser export function overrideFunction(pluginObj: any, methodName: string, args: any[], opts: any = {}): Observable { return new Observable(observer => { - const availabilityCheck = checkAvailability(pluginObj, methodName); + const availabilityCheck = checkAvailability(pluginObj, null, pluginObj.constructor.getPluginName()); if (availabilityCheck === true) { const pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());