Skip to content

Commit

Permalink
fix(core): fix issue with CordovaFunctionOverride decorator
Browse files Browse the repository at this point in the history
Decorator should not check if the method exists, only if the plugin exists
  • Loading branch information
ihadeed committed Dec 12, 2017
1 parent 0a12dc0 commit 6cd97ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/@ionic-native/core/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> {
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());
Expand Down

0 comments on commit 6cd97ca

Please sign in to comment.