fix: Small rendering flash in sidebar when document slug changes

This commit is contained in:
Tom Moor
2023-07-03 12:29:45 -04:00
parent a4ba1f18bc
commit 40dbbe10c5

View File

@@ -334,7 +334,9 @@ function InnerDocumentLink(
/>
}
isActive={(match, location: Location<{ starred?: boolean }>) =>
!!match && location.state?.starred === inStarredSection
(document
? location.pathname.endsWith(document.urlId)
: !!match) && location.state?.starred === inStarredSection
}
isActiveDrop={isOverReparent && canDropToReparent}
depth={depth}