1
0
Fork 0

FIX: discourse now uses helperContext to fetch siteSettings on frontend

Dieser Commit ist enthalten in:
fzngagan 2020-07-31 19:26:51 +05:30
Ursprung f70170abf7
Commit 63f8faea36

Datei anzeigen

@ -22,6 +22,7 @@ export default {
const Singleton = requirejs("discourse/mixins/singleton").default; const Singleton = requirejs("discourse/mixins/singleton").default;
const Store = requirejs("discourse/models/store").default; const Store = requirejs("discourse/models/store").default;
const registerRawHelpers = requirejs("discourse-common/lib/raw-handlebars-helpers").registerRawHelpers; 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 RawHandlebars = requirejs("discourse-common/lib/raw-handlebars").default;
const Site = requirejs("discourse/plugins/discourse-custom-wizard/wizard/models/site").default; const Site = requirejs("discourse/plugins/discourse-custom-wizard/wizard/models/site").default;
const RestAdapter = requirejs("discourse/adapters/rest").default; const RestAdapter = requirejs("discourse/adapters/rest").default;
@ -49,6 +50,7 @@ export default {
const siteSettings = Wizard.SiteSettings; const siteSettings = Wizard.SiteSettings;
app.register("site-settings:main", siteSettings, { instantiate: false }); app.register("site-settings:main", siteSettings, { instantiate: false });
createHelperContext(siteSettings);
targets.forEach(t => app.inject(t, "siteSettings", "site-settings:main")); targets.forEach(t => app.inject(t, "siteSettings", "site-settings:main"));
app.register("service:store", Store); app.register("service:store", Store);