修复3.16.0编译打包问题

This commit is contained in:
tangly1024.com
2023-06-27 14:00:37 +08:00
parent e18fe0271c
commit 562cb6137d
4 changed files with 12 additions and 9 deletions

View File

@@ -45,7 +45,7 @@ export async function getGlobalNotionData({
* @returns
*/
function getLatestPosts({ allPages, from, latestPostCount }) {
const allPosts = allPages.filter(page => page.type === 'Post' && page.status === 'Published')
const allPosts = allPages?.filter(page => page.type === 'Post' && page.status === 'Published')
const latestPosts = Object.create(allPosts).sort((a, b) => {
const dateA = new Date(a?.lastEditedTime || a?.createdTime || a?.date?.start_date)