fix(utils): fix isPC
. fixed #644
This commit is contained in:
parent
75cbfbbfe6
commit
4726498faa
@ -1,5 +1,7 @@
|
|||||||
export function isPC() {
|
export function isPC() {
|
||||||
const agents = ['Android', 'iPhone', 'webOS', 'BlackBerry', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
|
const agents = ['Android', 'iPhone', 'webOS', 'BlackBerry', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
|
||||||
|
|
||||||
return !agents.includes(window.navigator.userAgent);
|
const isMobile = agents.some(agent => window.navigator.userAgent.includes(agent));
|
||||||
|
|
||||||
|
return !isMobile;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user