mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
fix
This commit is contained in:
@@ -4,9 +4,6 @@ import BLOG from '@/blog.config'
|
||||
import { useGlobal } from './global'
|
||||
import { deepClone, isUrl } from './utils'
|
||||
|
||||
const getValue = (value, fallback) => (hasVal(value) ? fallback : value)
|
||||
const hasVal = value => value !== undefined && value !== null
|
||||
|
||||
/**
|
||||
* 读取配置顺序
|
||||
* 1. 优先读取NotionConfig表
|
||||
@@ -21,6 +18,8 @@ export const siteConfig = (key, defaultVal = null, extendConfig = {}) => {
|
||||
if (!key) {
|
||||
return null
|
||||
}
|
||||
const getValue = (value, fallback) => (hasVal(value) ? value : fallback)
|
||||
const hasVal = value => value !== undefined && value !== null
|
||||
|
||||
// 特殊配置处理;以下配置只在服务端生效;而Global的NOTION_CONFIG仅限前端组件使用,因此需要从extendConfig中读取
|
||||
switch (key) {
|
||||
|
||||
Reference in New Issue
Block a user