Fix UNCLOSEAI_LANGUAGE to return actual value not boolean
This commit is contained in:
parent
1912076b5b
commit
f7adaa1d74
1 changed files with 1 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ export async function getSystemMessage() {
|
|||
let userLang = "en";
|
||||
try {
|
||||
const storedLang = localStorage.getItem("uncloseai_language");
|
||||
const embedLang = typeof window !== "undefined" && window.UNCLOSEAI_LANGUAGE;
|
||||
const embedLang = (typeof window !== "undefined" && window.UNCLOSEAI_LANGUAGE) ? window.UNCLOSEAI_LANGUAGE : null;
|
||||
userLang = storedLang || embedLang || "en";
|
||||
} catch (error) {
|
||||
console.warn("Failed to read language preference:", error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue