From dadb45f609ffa634da12f780b366d0d6e80f1179 Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 27 Nov 2023 01:11:07 +0900 Subject: [PATCH] fix: syntax error at least this compiles --- gulpfile.js | 2 +- packages/backend/src/server/web/boot.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 7220d8421..37a8e75b2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -52,7 +52,7 @@ gulp.task("build:backend:script", () => { "./packages/backend/src/server/web/bios.js", "./packages/backend/src/server/web/cli.js", ]) - .pipe(replace("LANGS", JSON.stringify(Object.keys(locales)))) + .pipe(replace("SUPPORTED_LANGS", JSON.stringify(Object.keys(locales)))) .pipe( terser({ toplevel: true, diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index 1033bf101..04538332f 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -25,12 +25,12 @@ //#region Detect language & fetch translations const v = localStorage.getItem("v") || VERSION; - let supportedLangs = [] + let supportedLangs = []; try { - supportedLangs = LANGS; + supportedLangs = SUPPORTED_LANGS; } catch { - console.log("LANGS not found"); - }; + console.warn("LANGS not found"); + } let lang = localStorage.getItem("lang"); if (lang == null || !supportedLangs.includes(lang)) { if (supportedLangs.includes(navigator.language)) {