浏览代码

fix: expand user-agent check for mobile devices

huangyan321 1 年之前
父节点
当前提交
80b9b01a16
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/js/utils.js

+ 1 - 1
src/js/utils.js

@@ -1,4 +1,4 @@
-const isMobile = /mobile/i.test(window.navigator.userAgent);
+const isMobile = /mobile|android|iphone|ipod|phone|ipad/i.test(window.navigator.userAgent);
 
 const utils = {
     /**