diff --git a/themes/theme.js b/themes/theme.js index 97fcd64a..3d89f878 100644 --- a/themes/theme.js +++ b/themes/theme.js @@ -6,7 +6,7 @@ import { useRouter } from 'next/router' import { getQueryParam, getQueryVariable, isBrowser } from '../lib/utils' // 在next.config.js中扫描所有主题 -export const { THEMES = [] } = getConfig().publicRuntimeConfig +export const { THEMES = [] } = getConfig()?.publicRuntimeConfig || {} /** * 获取主题配置