Skip to content

Commit ef9aa89

Browse files
committed
chore(docs): fix a bug in sidenav
1 parent 33df6ad commit ef9aa89

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/docs/src/components/sidenav.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ export const AccordionButton = (props: {
123123
onClick: EventHandler<MouseEvent<HTMLButtonElement>>
124124
}) => {
125125
const transform = props.open ? 'rotate(-180 8 8)' : 'rotate(0 8 8)'
126-
const disabled = props.pathname ? props.pathname === props.href : false
126+
const disabled = props.pathname
127+
? props.href.startsWith(props.pathname)
128+
: false
127129

128130
return (
129131
<button

0 commit comments

Comments
 (0)