Skip to content

Commit 3ec6aec

Browse files
authored
fix: do not modify singleton global sidebar (#2911)
1 parent 2d14827 commit 3ec6aec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/runtime/src/hooks/useSidebar.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ function createInitialSidebar(
6060
rawSidebarData: SidebarData,
6161
activeMatcher: (link: string) => boolean,
6262
) {
63+
// do not modify singleton global sidebar - #2910
64+
rawSidebarData = structuredClone(rawSidebarData);
6365
const matchCache = new WeakMap<
6466
| NormalizedSidebarGroup
6567
| SidebarItem

0 commit comments

Comments
 (0)