mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(plugin): use call for id based clearFunction
This commit is contained in:
parent
9e86a40034
commit
c2fdf39089
2
dist/plugins/plugin.js
vendored
2
dist/plugins/plugin.js
vendored
@ -98,7 +98,7 @@ function wrapObservable(pluginObj, methodName, args, opts) {
|
||||
if (opts.clearWithArgs) {
|
||||
return util_1.get(window, pluginObj.pluginRef)[opts.clearFunction].apply(pluginObj, args);
|
||||
}
|
||||
return util_1.get(window, pluginObj.pluginRef)[opts.clearFunction].apply(pluginObj, pluginResult);
|
||||
return util_1.get(window, pluginObj.pluginRef)[opts.clearFunction].call(pluginObj, pluginResult);
|
||||
}
|
||||
catch (e) {
|
||||
console.warn('Unable to clear the previous observable watch for', pluginObj.name, methodName);
|
||||
|
2
dist/plugins/plugin.js.map
vendored
2
dist/plugins/plugin.js.map
vendored
File diff suppressed because one or more lines are too long
@ -109,7 +109,7 @@ function wrapObservable(pluginObj:any, methodName:string, args:any[], opts:any =
|
||||
if (opts.clearWithArgs){
|
||||
return get(window, pluginObj.pluginRef)[opts.clearFunction].apply(pluginObj, args);
|
||||
}
|
||||
return get(window, pluginObj.pluginRef)[opts.clearFunction].apply(pluginObj, pluginResult);
|
||||
return get(window, pluginObj.pluginRef)[opts.clearFunction].call(pluginObj, pluginResult);
|
||||
} catch(e) {
|
||||
console.warn('Unable to clear the previous observable watch for', pluginObj.name, methodName);
|
||||
console.log(e);
|
||||
|
Loading…
Reference in New Issue
Block a user