mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-22 18:42:48 +03:00
fix: wrong OS judgment (#1525)
This commit is contained in:
parent
1239957446
commit
21bfec3402
4
packages/env/src/ua-helper.ts
vendored
4
packages/env/src/ua-helper.ts
vendored
@ -12,6 +12,7 @@ export function getUaHelper() {
|
||||
(uas.indexOf('android') > -1 || uas.indexOf('linux') > -1)) ||
|
||||
uas.indexOf('adr') > -1;
|
||||
const ios = mobile && !android && /Mac OS/i.test(ua);
|
||||
const mac = !mobile && /Mac OS/i.test(ua);
|
||||
const iphone = ios && uas.indexOf('iphone') > -1;
|
||||
const ipad = ios && !iphone;
|
||||
const wx = /MicroMessenger/i.test(ua);
|
||||
@ -33,6 +34,7 @@ export function getUaHelper() {
|
||||
mobile,
|
||||
android,
|
||||
ios,
|
||||
mac,
|
||||
wx,
|
||||
chrome,
|
||||
iphone,
|
||||
@ -73,7 +75,7 @@ export function getUaHelper() {
|
||||
|
||||
private initUaFlags() {
|
||||
this.isLinux = this.checkUseragent('linux');
|
||||
this.isMacOs = this.checkUseragent('ios');
|
||||
this.isMacOs = this.checkUseragent('mac');
|
||||
this.isSafari = this.checkUseragent('safari');
|
||||
this.isWindows = this.checkUseragent('win');
|
||||
this.isFireFox = this.checkUseragent('firefox');
|
||||
|
Loading…
Reference in New Issue
Block a user