From 66f68e8faf3fa466a431ebbff7af5c1c93b1c664 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 24 Nov 2016 10:59:15 -0500 Subject: [PATCH] FIX: correctly bind `this` when sending a widget action --- app/assets/javascripts/discourse/widgets/widget.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/widget.js.es6 b/app/assets/javascripts/discourse/widgets/widget.js.es6 index ddbc50c8e07..bb35076a5e3 100644 --- a/app/assets/javascripts/discourse/widgets/widget.js.es6 +++ b/app/assets/javascripts/discourse/widgets/widget.js.es6 @@ -319,7 +319,7 @@ export default class Widget { return this.rerenderResult(() => { const widget = this._findAncestorWithProperty(name); if (widget) { - return widget[name](param); + return widget[name].call(widget, param); } return this._sendComponentAction(name, param || this.findAncestorModel());