Skip to content

Commit

Permalink
REVERT: partly revert change to ensure context is the same (#10012)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed Jun 10, 2020
1 parent a3dfd55 commit 8fe0744
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/assets/javascripts/discourse/app/widgets/widget.js
Expand Up @@ -336,12 +336,12 @@ export default class Widget {

sendWidgetAction(name, param) {
return this.rerenderResult(() => {
const widgetFunction = this.callWidgetFunction(name, param);
const widget = this._findAncestorWithProperty(name);
if (widget) {
return widget[name].call(widget, param);
}

return (
widgetFunction ||
this._sendComponentAction(name, param || this.findAncestorModel())
);
return this._sendComponentAction(name, param || this.findAncestorModel());
});
}

Expand Down

0 comments on commit 8fe0744

Please sign in to comment.