fix: Small rendering flash in sidebar when document slug changes

This commit is contained in:
Tom Moor
2023-07-03 20:23:06 -04:00
parent 7c5d834f39
commit 72c7b0373b

View File

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