mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
Fix workflow detail (#3382)
* fix: loop node init * fix: workflow detail * fix: point table * add null check
This commit is contained in:
@@ -43,14 +43,16 @@ export const useI18nLng = () => {
|
||||
setLang(lang);
|
||||
|
||||
await i18n?.changeLanguage?.(lang);
|
||||
if (prevLang && prevLang !== lang) {
|
||||
|
||||
if (!i18n.hasResourceBundle(lang, 'common') && prevLang !== lang) {
|
||||
window?.location?.reload?.();
|
||||
}
|
||||
};
|
||||
|
||||
const setUserDefaultLng = () => {
|
||||
const setUserDefaultLng = (forceGetDefaultLng: boolean = false) => {
|
||||
if (!navigator || !localStorage) return;
|
||||
if (getLang()) return onChangeLng(getLang() as string);
|
||||
|
||||
if (getLang() && !forceGetDefaultLng) return onChangeLng(getLang() as string);
|
||||
|
||||
const lang = languageMap[navigator.language] || 'en';
|
||||
|
||||
|
Reference in New Issue
Block a user