Skip to content

Commit b1ea505

Browse files
authored
Fix isSafari crashing on React Native
1 parent e9869c4 commit b1ea505

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/util/src/environment.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ export function isNodeSdk(): boolean {
138138
export function isSafari(): boolean {
139139
return (
140140
!isNode() &&
141+
navigator.userAgent !== undefined && // not react-native
141142
navigator.userAgent.includes('Safari') &&
142143
!navigator.userAgent.includes('Chrome')
143144
);

0 commit comments

Comments
 (0)