From fc432a9cab487dc6af1d376a900fe8a5842bb5c7 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 29 Sep 2021 11:14:53 +0200 Subject: [PATCH] FIX: incorrect interpolation was limiting to 1 dispatch / component (#14470) --- app/assets/javascripts/discourse/app/lib/plugin-api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/lib/plugin-api.js b/app/assets/javascripts/discourse/app/lib/plugin-api.js index 2caaf9b4edb..3ecca9ea862 100644 --- a/app/assets/javascripts/discourse/app/lib/plugin-api.js +++ b/app/assets/javascripts/discourse/app/lib/plugin-api.js @@ -1461,7 +1461,8 @@ class PluginApi { this.modifyClass( `component:${mountedComponent}`, { - pluginId: `#{mountedComponent}/#{widgetKey}/#{appEvent}`, + pluginId: `${mountedComponent}/${widgetKey}/${appEvent}`, + didInsertElement() { this._super(); this.dispatch(appEvent, widgetKey);