Skip to content

Commit

Permalink
use !! to coerce navigator.userAgent to a boolean
Browse files Browse the repository at this point in the history
Co-authored-by: dconeybe <dconeybe@google.com>
  • Loading branch information
Yonom and dconeybe committed Jan 19, 2024
1 parent e38eae5 commit d94a69b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/util/src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function isNodeSdk(): boolean {
export function isSafari(): boolean {
return (
!isNode() &&
navigator.userAgent &&
!!navigator.userAgent &&
navigator.userAgent.includes('Safari') &&
!navigator.userAgent.includes('Chrome')
);
Expand Down

0 comments on commit d94a69b

Please sign in to comment.