diff --git a/.env.local b/.env.local index 90456af7..11f8351f 100644 --- a/.env.local +++ b/.env.local @@ -1,2 +1,2 @@ # 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables -NEXT_PUBLIC_VERSION=3.14.0 \ No newline at end of file +NEXT_PUBLIC_VERSION=3.15.0 \ No newline at end of file diff --git a/package.json b/package.json index c0f5452d..67dbcd6c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notion-next", - "version": "3.14.0", + "version": "3.15.0", "homepage": "https://github.com/tangly1024/NotionNext.git", "license": "MIT", "repository": { diff --git a/pages/[...slug].js b/pages/[...slug].js index f0d3f8d2..d62a110a 100644 --- a/pages/[...slug].js +++ b/pages/[...slug].js @@ -126,7 +126,7 @@ export async function getStaticProps({ params: { slug } }) { const from = `slug-props-${fullSlug}` const props = await getGlobalNotionData({ from }) // 在列表内查找文章 - props.post = props.allPages.find((p) => { + props.post = props?.allPages?.find((p) => { return p.slug === fullSlug || p.id === idToUuid(fullSlug) }) diff --git a/themes/hexo/LayoutTag.js b/themes/hexo/LayoutTag.js index fa63df85..cd72a015 100644 --- a/themes/hexo/LayoutTag.js +++ b/themes/hexo/LayoutTag.js @@ -6,7 +6,7 @@ import React from 'react' import Link from 'next/link' export const LayoutTag = (props) => { - const tag = props.tagOptions.find((t) => { + const tag = props?.tagOptions?.find((t) => { return t.name === props.tag })