fix(plugin): use call for id based clearFunction

This commit is contained in:
Tim Lancina 2016-02-08 13:07:26 -06:00
parent 9e86a40034
commit c2fdf39089
3 changed files with 3 additions and 3 deletions

View File

@ -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);

File diff suppressed because one or more lines are too long

View File

@ -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);