File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,15 @@ const preview: Preview = {
1717 docs : {
1818 toc : true ,
1919 container : ( props : DocsContainerProps < ReactRenderer > ) => {
20- const { getStoryContext, storyById } = props . context ;
20+ try {
21+ const { getStoryContext, storyById } = props . context ;
2122
22- const globals = getStoryContext ( storyById ( ) ) . globals ;
23- const theme = globals . theme === "dark" ? themes . dark : themes . light ;
24-
25- return < DocsContainer { ...props } theme = { theme } /> ;
23+ const globals = getStoryContext ( storyById ( ) ) . globals ;
24+ const theme = globals . theme === "dark" ? themes . dark : themes . light ;
25+ return < DocsContainer { ...props } theme = { theme } /> ;
26+ } catch {
27+ return < DocsContainer { ...props } /> ;
28+ }
2629 } ,
2730 } ,
2831 } ,
You can’t perform that action at this time.
0 commit comments