From 0bbdf6affc44d1d4553a05f6035fa809a0163a6f Mon Sep 17 00:00:00 2001 From: MagicalCodeMonkey Date: Sun, 15 Mar 2020 01:02:33 -0400 Subject: [PATCH] Fix a minor issue with slash detection --- SettingsHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SettingsHelper.js b/SettingsHelper.js index 6f6dc8ec..6f3948bd 100644 --- a/SettingsHelper.js +++ b/SettingsHelper.js @@ -85,7 +85,7 @@ module.exports = function () { output[setting.local] = output[setting.local].replace(/\/+$/, ""); } // Add leading slash, if not provided - if (setting.local == 'webroot' && !output[setting.local].startsWith("/")) { + if (setting.local == 'webroot' && output[setting.local].length > 1 && !output[setting.local].startsWith("/")) { console.log(`${setting.local}/${setting.env} should always start with '/'. Adding the leading slash for you.`); // Make sure it starts with one leading slash output[setting.local] = `/${output[setting.local]}`;