diff --git a/lib/config.js b/lib/config.js index 46575239..25211f30 100644 --- a/lib/config.js +++ b/lib/config.js @@ -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中的表格配置