Skip to content

Commit c4af496

Browse files
committed
device: simplify check for isMac()
1 parent e387df2 commit c4af496

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

client/utils/device.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@
44
* - see https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
55
*/
66
export function isMac(): boolean {
7-
return typeof navigator?.userAgent === 'string'
8-
? navigator.userAgent.toLowerCase().includes('mac')
9-
: false;
7+
return navigator?.userAgent?.toLowerCase().includes('mac') ?? false;
108
}

0 commit comments

Comments
 (0)