From 7b5b3799c281aa531897671e0fb6dbfca839f178 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 3 Oct 2023 10:03:58 +0100 Subject: [PATCH] FIX: Use correct subfolder format for ember-cli config (#23754) Ember expects a trailing slash on this value, which is different to the Rails app's behavior. Values without a trailing slash seemed to work for legacy ember-cli builds, but would lead to errors under embroider. --- app/assets/javascripts/discourse/config/environment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/config/environment.js b/app/assets/javascripts/discourse/config/environment.js index 345b5c3c30e..2a0b38dbc4f 100644 --- a/app/assets/javascripts/discourse/config/environment.js +++ b/app/assets/javascripts/discourse/config/environment.js @@ -4,7 +4,7 @@ module.exports = function (environment) { const ENV = { modulePrefix: "discourse", environment, - rootURL: process.env.DISCOURSE_RELATIVE_URL_ROOT || "/", + rootURL: `${process.env.DISCOURSE_RELATIVE_URL_ROOT ?? ""}/`, // Add a trailing slash (not required by the Rails app in this env variable) locationType: "history", historySupportMiddleware: false, EmberENV: {