diff --git a/tdrive/backend/node/src/services/documents/utils.ts b/tdrive/backend/node/src/services/documents/utils.ts index f6c1d8949..bce12a3a0 100644 --- a/tdrive/backend/node/src/services/documents/utils.ts +++ b/tdrive/backend/node/src/services/documents/utils.ts @@ -46,7 +46,7 @@ export const isSharedWithMeFolder = (id: string) => { export const getVirtualFoldersNames = async (id: string, context: DriveExecutionContext) => { const configuration = new Configuration("drive"); - const defaultLang = configuration.get("defaultLanguage", "en") as string; + const defaultLang = configuration.get("defaultLanguage") || "en"; const user = await gr.services.users.get({ id: context.user?.id }); const locale = user?.preferences?.locale || defaultLang; diff --git a/tdrive/backend/node/src/utils/users.ts b/tdrive/backend/node/src/utils/users.ts index fa7c5b300..35555fb16 100644 --- a/tdrive/backend/node/src/utils/users.ts +++ b/tdrive/backend/node/src/utils/users.ts @@ -15,7 +15,7 @@ export async function formatUser( ): Promise { if (!user) return null; const configuration = new Configuration("drive"); - const defaultLang = configuration.get("defaultLanguage", "en") as string; + const defaultLang = configuration.get("defaultLanguage") || "en"; let resUser = { id: user.id,