From 63f8faea36f02bbf7cc3a539f439b97ea1ae104e Mon Sep 17 00:00:00 2001 From: fzngagan Date: Fri, 31 Jul 2020 19:26:51 +0530 Subject: [PATCH] FIX: discourse now uses helperContext to fetch siteSettings on frontend --- assets/javascripts/wizard/initializers/custom.js.es6 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/javascripts/wizard/initializers/custom.js.es6 b/assets/javascripts/wizard/initializers/custom.js.es6 index 777ddd6d..e7a1b6e2 100644 --- a/assets/javascripts/wizard/initializers/custom.js.es6 +++ b/assets/javascripts/wizard/initializers/custom.js.es6 @@ -22,6 +22,7 @@ export default { const Singleton = requirejs("discourse/mixins/singleton").default; const Store = requirejs("discourse/models/store").default; const registerRawHelpers = requirejs("discourse-common/lib/raw-handlebars-helpers").registerRawHelpers; + const createHelperContext = requirejs("discourse-common/lib/helpers").createHelperContext; const RawHandlebars = requirejs("discourse-common/lib/raw-handlebars").default; const Site = requirejs("discourse/plugins/discourse-custom-wizard/wizard/models/site").default; const RestAdapter = requirejs("discourse/adapters/rest").default; @@ -49,6 +50,7 @@ export default { const siteSettings = Wizard.SiteSettings; app.register("site-settings:main", siteSettings, { instantiate: false }); + createHelperContext(siteSettings); targets.forEach(t => app.inject(t, "siteSettings", "site-settings:main")); app.register("service:store", Store);