From 77f410665bf91266bec7d00cf1b7d4365db1d3a6 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Tue, 29 Oct 2024 16:49:08 +0800 Subject: [PATCH] =?UTF-8?q?redirect=20=E8=AF=AD=E8=A8=80bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/global.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/global.js b/lib/global.js index da2232caef0..f526e165476 100644 --- a/lib/global.js +++ b/lib/global.js @@ -90,7 +90,10 @@ export function GlobalContextProvider(props) { useEffect(() => { initDarkMode(updateDarkMode, defaultDarkMode) initLocale(lang, locale, updateLang, updateLocale) - if (NOTION_CONFIG?.REDIRECT_LANG) { + if ( + NOTION_CONFIG?.REDIRECT_LANG && + JSON.parse(NOTION_CONFIG?.REDIRECT_LANG) + ) { redirectUserLang(NOTION_PAGE_ID) } setOnLoading(false)