Browse Source

fix: expand user-agent check for mobile devices

huangyan321 1 year ago
parent
commit
80b9b01a16
1 changed files with 1 additions and 1 deletions
  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 = {
     /**