mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-31 07:26:43 +00:00
build:
编译修复
This commit is contained in:
@@ -14,7 +14,10 @@ export default function Tag ({ tags, allPosts, filteredPosts, tag, categories })
|
||||
}
|
||||
|
||||
// 将当前选中的标签置顶🔝
|
||||
const newTags = [tags.find(r => r.name === tag)].concat(tags.filter(r => r.name !== tag))
|
||||
if (!tags) tags = []
|
||||
const currentTag = tags?.find(r => r?.name === tag)
|
||||
const newTags = currentTag ? [currentTag].concat(tags.filter(r => r?.name !== tag)) : tags.filter(r => r?.name !== tag)
|
||||
|
||||
return <BaseLayout meta={meta} tags={tags} currentTag={tag} categories={categories} totalPosts={allPosts}>
|
||||
<StickyBar>
|
||||
<TagList tags={newTags} currentTag={tag}/>
|
||||
|
||||
Reference in New Issue
Block a user