Skip to content

Commit

Permalink
redirect 语言bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Oct 29, 2024
1 parent a455fe5 commit 77f4106
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 77f4106

Please sign in to comment.