From 9ed60778e40678fed2f3202318fb030fb06ef455 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 22 Nov 2024 15:19:23 +0100 Subject: [PATCH] Fix environment usage in preview file --- code/addons/a11y/src/preview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/a11y/src/preview.tsx b/code/addons/a11y/src/preview.tsx index 8ca566dc190..da554a9320e 100644 --- a/code/addons/a11y/src/preview.tsx +++ b/code/addons/a11y/src/preview.tsx @@ -11,7 +11,7 @@ expect.extend(matchers); // @ts-expect-error - ignore // todo: check in webpack environments -const isVitestStandaloneRun = import.meta?.env?.STORYBOOK !== 'true'; +const isVitestStandaloneRun = import.meta?.env?.STORYBOOK && import.meta?.env?.STORYBOOK !== 'true'; export const afterEach = async ({ reporting, parameters, globals, id }: StoryContext) => { const a11yParameter: A11yParameters | undefined = parameters.a11y;