mirror of
https://github.com/zadam/trilium.git
synced 2026-06-18 11:21:41 +02:00
chore(core): don't log language option not found if DB not initialized
This commit is contained in:
@@ -28,14 +28,12 @@ function getCurrentLanguage(): LOCALE_IDS {
|
||||
let language: string | null = null;
|
||||
if (sql_init.isDbInitialized()) {
|
||||
language = options.getOptionOrNull("locale");
|
||||
if (!language) {
|
||||
console.info("Language option not found, falling back to en.");
|
||||
}
|
||||
}
|
||||
|
||||
if (!language) {
|
||||
console.info("Language option not found, falling back to en.");
|
||||
language = "en";
|
||||
}
|
||||
|
||||
return language as LOCALE_IDS;
|
||||
return (language ?? "en") as LOCALE_IDS;
|
||||
}
|
||||
|
||||
export async function changeLanguage(locale: string) {
|
||||
|
||||
Reference in New Issue
Block a user