mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
feat(plugin): call clearFunction with original fn args
This commit is contained in:
@@ -106,6 +106,9 @@ function wrapObservable(pluginObj:any, methodName:string, args:any[], opts:any =
|
||||
|
||||
return () => {
|
||||
try {
|
||||
if (opts.clearWithArgs){
|
||||
return get(window, pluginObj.pluginRef)[opts.clearFunction].apply(pluginObj, args);
|
||||
}
|
||||
return get(window, pluginObj.pluginRef)[opts.clearFunction].apply(pluginObj, pluginResult);
|
||||
} catch(e) {
|
||||
console.warn('Unable to clear the previous observable watch for', pluginObj.name, methodName);
|
||||
|
||||
Reference in New Issue
Block a user