Fix UNCLOSEAI_LANGUAGE to return actual value not boolean

This commit is contained in:
Russell Ballestrini 2026-01-03 12:53:10 -05:00
parent 1912076b5b
commit f7adaa1d74

View file

@ -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);