fix(theme): unexpectedly overlooked sidebar icon (#374)

This commit is contained in:
pengzhanbo 2024-12-15 00:10:39 +08:00 committed by GitHub
parent 71304ee160
commit 801d1a6ac7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -148,7 +148,7 @@ function resolveSidebarItems(
if (link) {
navLink.link = normalizeLink(_prefix, link)
const nav = resolveNavLink(navLink.link)
navLink.icon = nav.icon
navLink.icon = nav.icon || navLink.icon
}
const nextPrefix = normalizePrefix(_prefix, prefix || dir)
if (items === 'auto') {
@ -156,7 +156,7 @@ function resolveSidebarItems(
if (!navLink.link && autoHomeData.value[nextPrefix]) {
navLink.link = normalizeLink(autoHomeData.value[nextPrefix])
const nav = resolveNavLink(navLink.link)
navLink.icon = nav.icon
navLink.icon = nav.icon || navLink.icon
}
}
else {