diff --git a/lib/utils.js b/lib/utils.js index 3e3831e5..a97c114a 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -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