mirror of
https://example.com
synced 2024-11-22 11:56:38 +09:00
fix: syntax error
at least this compiles
This commit is contained in:
parent
3af65beba0
commit
dadb45f609
2 changed files with 5 additions and 5 deletions
|
@ -52,7 +52,7 @@ gulp.task("build:backend:script", () => {
|
||||||
"./packages/backend/src/server/web/bios.js",
|
"./packages/backend/src/server/web/bios.js",
|
||||||
"./packages/backend/src/server/web/cli.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(
|
.pipe(
|
||||||
terser({
|
terser({
|
||||||
toplevel: true,
|
toplevel: true,
|
||||||
|
|
|
@ -25,12 +25,12 @@
|
||||||
//#region Detect language & fetch translations
|
//#region Detect language & fetch translations
|
||||||
const v = localStorage.getItem("v") || VERSION;
|
const v = localStorage.getItem("v") || VERSION;
|
||||||
|
|
||||||
let supportedLangs = []
|
let supportedLangs = [];
|
||||||
try {
|
try {
|
||||||
supportedLangs = LANGS;
|
supportedLangs = SUPPORTED_LANGS;
|
||||||
} catch {
|
} catch {
|
||||||
console.log("LANGS not found");
|
console.warn("LANGS not found");
|
||||||
};
|
}
|
||||||
let lang = localStorage.getItem("lang");
|
let lang = localStorage.getItem("lang");
|
||||||
if (lang == null || !supportedLangs.includes(lang)) {
|
if (lang == null || !supportedLangs.includes(lang)) {
|
||||||
if (supportedLangs.includes(navigator.language)) {
|
if (supportedLangs.includes(navigator.language)) {
|
||||||
|
|
Loading…
Reference in a new issue