From dc7249cfd2660a2f277e4b87bfa296e3610213b7 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Fri, 2 Oct 2020 19:32:18 +1000 Subject: [PATCH] Update wizard-raw-templates.js.erb --- assets/javascripts/wizard-raw-templates.js.erb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/wizard-raw-templates.js.erb b/assets/javascripts/wizard-raw-templates.js.erb index 75a44abc..fb4c2dda 100644 --- a/assets/javascripts/wizard-raw-templates.js.erb +++ b/assets/javascripts/wizard-raw-templates.js.erb @@ -20,16 +20,14 @@ Discourse.unofficial_plugins.each do |plugin| compiled = Barber::Precompiler.new().compile(File.read(f)) result << " (function() { - const { addRawTemplate } = requirejs('discourse-common/lib/raw-templates'); - addRawTemplate(#{compiled}); + requirejs('discourse-common/lib/raw-templates').addRawTemplate(#{compiled}); })(); " end result << " (function() { - const rawTemplates = requirejs('discourse-common/lib/raw-templates'); - window.__DISCOURSE_RAW_TEMPLATES = rawTemplates.__DISCOURSE_RAW_TEMPLATES; + window.__DISCOURSE_RAW_TEMPLATES = requirejs('discourse-common/lib/raw-templates').__DISCOURSE_RAW_TEMPLATES; })(); " end