Merge pull request #1636 from Heathcliff-third-space/patch-1

fix 修复heo主题从NotionConfig读取失败Bug
This commit is contained in:
tangly1024
2023-11-20 16:58:25 +08:00
committed by GitHub

View File

@@ -8,8 +8,10 @@ import { siteConfig } from '@/lib/config'
* 通知横幅
*/
export function NoticeBar() {
const notices = siteConfig('HEO_NOTICE_BAR', null, CONFIG)
let notices = siteConfig('HEO_NOTICE_BAR', null, CONFIG)
if (typeof notices === 'string') {
notices = JSON.parse(notices)
}
if (!notices || notices?.length === 0) {
return <></>
}