From 7df349afd6269aad75d6af5ec5e443a0a5120f75 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 28 Sep 2017 11:13:30 -0400 Subject: [PATCH] Allow reopened widgets to use `hbs` templates --- app/assets/javascripts/discourse/widgets/widget.js.es6 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/discourse/widgets/widget.js.es6 b/app/assets/javascripts/discourse/widgets/widget.js.es6 index 8b2c34e8ad6..339549c3b4e 100644 --- a/app/assets/javascripts/discourse/widgets/widget.js.es6 +++ b/app/assets/javascripts/discourse/widgets/widget.js.es6 @@ -127,6 +127,10 @@ export function reopenWidget(name, opts) { return; } + if (opts.template) { + opts.html = opts.template; + } + Object.keys(opts).forEach(k => existing.prototype[k] = opts[k]); return existing; }