Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Remove invalid languages error (#9928)

seikyo-cho-lvgsaafa4a3c8bf9
diff --git a/web/i18n/server.ts b/web/i18n/server.ts
index 933899e6a1f..e976f3ed410 100644
--- a/web/i18n/server.ts
+++ b/web/i18n/server.ts
@@ -47,10 +47,8 @@ export const getLocaleOnServer = (): Locale => {
}
// Validate languages
- if (!Array.isArray(languages) || languages.length === 0 || !languages.every(lang => typeof lang === 'string' && /^[\w-]+$/.test(lang))) {
- console.error(`Invalid languages: ${languages}`)
+ if (!Array.isArray(languages) || languages.length === 0 || !languages.every(lang => typeof lang === 'string' && /^[\w-]+$/.test(lang)))
languages = [i18n.defaultLocale]
- }
// match locale
const matchedLocale = match(languages, locales, i18n.defaultLocale) as Locale