Skip to content

Commit 79c8e8f

Browse files
Fix chromatic check when process undefined (e.g. vite projects) (adobe#8494)
Co-authored-by: Robert Snow <rsnow@adobe.com>
1 parent 026c663 commit 79c8e8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@react-spectrum/overlays/src/OpenTransition.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function OpenTransition(
3535
props: any
3636
): JSX.Element | ReactElement<any, string | JSXElementConstructor<any>>[] {
3737
// Do not apply any transition if in chromatic.
38-
if (process.env.CHROMATIC) {
38+
if (typeof process !== 'undefined' && process.env.CHROMATIC) {
3939
return React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: props.in}));
4040
}
4141

0 commit comments

Comments
 (0)