mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
Merge branch 'main' of https://github.com/tangly1024/NotionNext
This commit is contained in:
@@ -133,9 +133,11 @@ export const isMobile = () => {
|
||||
if (!isBrowser()) {
|
||||
return isMobile
|
||||
}
|
||||
if (!isMobile && navigator.userAgentData.mobile) {
|
||||
isMobile = true
|
||||
}
|
||||
|
||||
// 这个判断会引发 TypeError: navigator.userAgentData.mobile is undefined 问题,导致博客无法正常工作
|
||||
// if (!isMobile && navigator.userAgentData.mobile) {
|
||||
// isMobile = true
|
||||
// }
|
||||
|
||||
if (!isMobile && (/Mobi|Android|iPhone/i.test(navigator.userAgent))) {
|
||||
isMobile = true
|
||||
|
||||
Reference in New Issue
Block a user