From 5cb99d08ed468c5b5bc3f0fc51fee2ac2468d116 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 13 Dec 2018 15:43:30 +0100 Subject: [PATCH] FIX: define actions on connector class early (#6763) This would prevent failure with connectors templates defining actions as closures. In this case action existence is checked at compile time and not runtime. --- .../javascripts/discourse/components/plugin-connector.js.es6 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/discourse/components/plugin-connector.js.es6 b/app/assets/javascripts/discourse/components/plugin-connector.js.es6 index bd1eabac9c6..4d0ece9c6f2 100644 --- a/app/assets/javascripts/discourse/components/plugin-connector.js.es6 +++ b/app/assets/javascripts/discourse/components/plugin-connector.js.es6 @@ -12,6 +12,8 @@ export default Ember.Component.extend({ const connectorClass = this.get("connector.connectorClass"); connectorClass.setupComponent.call(this, args, this); + + this.set("actions", connectorClass.actions); }, @observes("args")