Merge pull request #3072 from qixing-jk/fix-shortid

feat(更换short_id实现方式): 避免因为缩短导致的潜在bug
This commit is contained in:
tangly1024
2024-12-21 21:24:18 +08:00
committed by GitHub
3 changed files with 4 additions and 8 deletions

View File

@@ -78,7 +78,7 @@ function getNavPagesWithLatest(allNavPages, latestPosts, post) {
}
// 属于最新文章通常6篇 && (无阅读记录 || 最近更新时间大于上次阅读时间)
if (
latestPosts.some(post => post?.id.indexOf(item?.short_id) === 0) &&
latestPosts.some(post => post?.id.indexOf(item?.short_id) === 14) &&
(!postReadTime[item.short_id] ||
postReadTime[item.short_id] < new Date(item.lastEditedDate).getTime())
) {