Skip to content

Commit

Permalink
fix: tabData undefined when syncIndex (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeless0911 authored Apr 26, 2024
1 parent c8eee02 commit 088e8d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/famous-bees-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rspress/theme-default': patch
---

fix tabData undefined when syncindex
7 changes: 4 additions & 3 deletions packages/theme-default/src/logic/TabDataContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface ITabDataContext {
setTabData: (data: TabData) => void;
}

export const TabDataContext = createContext<ITabDataContext>(
{} as ITabDataContext,
);
export const TabDataContext = createContext<ITabDataContext>({
tabData: {},
setTabData: () => {},
});

0 comments on commit 088e8d3

Please sign in to comment.