Skip to content

Commit 8d0693c

Browse files
committed
fix(replay): Ensure replay is deactivated in workers
1 parent 75016bb commit 8d0693c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/replay/src/util/isBrowser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { isNodeEnv } from '@sentry/utils';
22

33
export function isBrowser(): boolean {
4-
return !isNodeEnv();
4+
// eslint-disable-next-line no-restricted-globals
5+
return !isNodeEnv() && typeof window !== 'undefined';
56
}

0 commit comments

Comments
 (0)