reduce warning log

This commit is contained in:
tangly1024.com
2024-03-04 17:17:05 +08:00
parent efb596ee25
commit 15a327a480

View File

@@ -17,8 +17,11 @@ import { deepClone } from './utils'
export const siteConfig = (key, defaultVal = null, extendConfig = null) => {
let global = null
try {
const isClient = typeof window !== 'undefined';
// eslint-disable-next-line react-hooks/rules-of-hooks
global = useGlobal()
global = isClient ? useGlobal() : {}
// eslint-disable-next-line react-hooks/rules-of-hooks
// global = useGlobal()
} catch (error) {}
// 首先 配置最优先读取NOTION中的表格配置