Skip to content

Commit d94a69b

Browse files
Yonomdconeybe
andcommitted
use !! to coerce navigator.userAgent to a boolean
Co-authored-by: dconeybe <[email protected]>
1 parent e38eae5 commit d94a69b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/util/src/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function isNodeSdk(): boolean {
138138
export function isSafari(): boolean {
139139
return (
140140
!isNode() &&
141-
navigator.userAgent &&
141+
!!navigator.userAgent &&
142142
navigator.userAgent.includes('Safari') &&
143143
!navigator.userAgent.includes('Chrome')
144144
);

0 commit comments

Comments
 (0)