From a8b33b54157963948f514b6b57b4ab67b89a3d5e Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 24 Nov 2023 18:04:06 -0800 Subject: [PATCH] fix: :bug: SOMETHING_HAPPENED_IN_PROMISE when LANGS isn't found --- packages/backend/src/server/web/boot.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index 4bd9326aac..0c60af4bde 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -25,7 +25,10 @@ //#region Detect language & fetch translations const v = localStorage.getItem("v") || VERSION; - const supportedLangs = LANGS; + const supportedLangs = [] + if (LANGS != null) { + supportedLangs.add(...LANGS) + }; let lang = localStorage.getItem("lang"); if (lang == null || !supportedLangs.includes(lang)) { if (supportedLangs.includes(navigator.language)) {