diff --git a/lib/ui/src/components/preview/preview.stories.tsx b/lib/ui/src/components/preview/preview.stories.tsx
index a4277eda4c80..439a70e07735 100644
--- a/lib/ui/src/components/preview/preview.stories.tsx
+++ b/lib/ui/src/components/preview/preview.stories.tsx
@@ -144,22 +144,7 @@ export const WithCanvasTab = () => (
);
-export const WithTabs = () => (
-
- {({ api }: Combo) => {
- return (
- ({}),
- getQueryParam: () => '',
- }}
- />
- );
- }}
-
-);
+export const WithTabs = () => ;
export const WithToolbarExclusions = () => (
diff --git a/lib/ui/src/components/preview/toolbar.tsx b/lib/ui/src/components/preview/toolbar.tsx
index 538e2b6de47e..bf14a543fe9e 100644
--- a/lib/ui/src/components/preview/toolbar.tsx
+++ b/lib/ui/src/components/preview/toolbar.tsx
@@ -132,9 +132,10 @@ const useTools = (
[defaultToolsExtra, toolsExtraFromConfig]
);
- const toolbarExclusions = getQueryParam(TOOLBAR_EXCLUSION_PARAM)
- ? getQueryParam(TOOLBAR_EXCLUSION_PARAM).split(',')
- : [];
+ const toolbarExclusions: string[] =
+ getQueryParam && getQueryParam(TOOLBAR_EXCLUSION_PARAM)
+ ? getQueryParam(TOOLBAR_EXCLUSION_PARAM).split(',')
+ : [];
return useMemo(() => {
return story && story.parameters