mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(core): fix issue with CordovaFunctionOverride decorator
Decorator should not check if the method exists, only if the plugin exists
This commit is contained in:
parent
0a12dc0792
commit
6cd97ca0ee
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user