Skip to content

Commit ef65558

Browse files
authored
Merge pull request #3310 from LooseLi/post-sort-by
fix(文章排序)
2 parents d9e215b + 8e0dd0b commit ef65558

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/db/getSiteData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ async function convertNotionToSiteDate(pageId, from, pageRecordMap) {
245245
})
246246

247247
// Sort by date
248-
if (siteConfig('POSTS_SORT_BY', '', NOTION_CONFIG) === 'date') {
248+
if (siteConfig('POSTS_SORT_BY', null, NOTION_CONFIG) === 'date') {
249249
allPages.sort((a, b) => {
250250
return b?.publishDate - a?.publishDate
251251
})

0 commit comments

Comments
 (0)