Skip to content

Commit 674c20e

Browse files
Fixed #4564 by checking process type
Fixed #4564 to eliminate typing issue
1 parent ad158c5 commit 674c20e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/utils/src/getTestIds.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function getTestIdsBrowser(): TestIdShape {
2727
export default function getTestIds(): TestIdShape {
2828
// For some reason, even though process.env contains the value of `test` for NODE_ENV, accessing it directly returns
2929
// 'development'. Using `get()` does, in fact, return test so sticking with it
30-
if (get(process, 'env.NODE_ENV') !== 'test') {
30+
if (typeof process !== 'undefined' && get(process, 'env.NODE_ENV') !== 'test') {
3131
return getTestIdsBrowser();
3232
}
3333

0 commit comments

Comments
 (0)