chore: use navigator.userAgent
instead of navigator.platform
(#3247)
This commit is contained in:
parent
40fb0b70ec
commit
5319c1c031
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ export function noop() {}
|
|||
export function useIsMac() {
|
||||
const headers = useRequestHeaders(['user-agent'])
|
||||
return computed(() => headers['user-agent']?.includes('Macintosh')
|
||||
?? navigator?.platform?.includes('Mac') ?? false)
|
||||
?? navigator?.userAgent?.includes('Mac') ?? false)
|
||||
}
|
||||
|
||||
export function isEmptyObject(object: object) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue