Skip to content

Commit 8f27fc9

Browse files
committed
feat(plugin): call clearFunction with original fn args
1 parent 6688c4d commit 8f27fc9

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

dist/plugins/plugin.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/plugin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/plugins/plugin.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ function wrapObservable(pluginObj:any, methodName:string, args:any[], opts:any =
106106

107107
return () => {
108108
try {
109+
if (opts.clearWithArgs){
110+
return get(window, pluginObj.pluginRef)[opts.clearFunction].apply(pluginObj, args);
111+
}
109112
return get(window, pluginObj.pluginRef)[opts.clearFunction].apply(pluginObj, pluginResult);
110113
} catch(e) {
111114
console.warn('Unable to clear the previous observable watch for', pluginObj.name, methodName);

0 commit comments

Comments
 (0)