Skip to content

Commit 8627def

Browse files
committed
Fix chromatic check when process undefined (e.g. vite projects)
1 parent a7b1a28 commit 8627def

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
@@ -37,7 +37,7 @@ export function OpenTransition(
3737
props
3838
): JSX.Element | ReactElement<any, string | JSXElementConstructor<any>>[] {
3939
// Do not apply any transition if in chromatic.
40-
if (process.env.CHROMATIC) {
40+
if (typeof process !== 'undefined' && process.env.CHROMATIC) {
4141
return React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: props.in}));
4242
}
4343

0 commit comments

Comments
 (0)