Skip to content

Commit

Permalink
Merge pull request #74 from chengpeiquan/develop
Browse files Browse the repository at this point in the history
Set isMobile as default.
  • Loading branch information
chengpeiquan authored Mar 5, 2021
2 parents 6425de7 + a8cb877 commit c92a95e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/isMobile.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* 判断是否手机平台
*/
let isMobile: boolean = false;
let isMobile: boolean = true;

try {
isMobile = /iPhone|phone|android|iPod|pad|iPad/i.test( navigator.userAgent.toLowerCase() );
} catch (e) {
isMobile = false;
isMobile = true;
}

export default isMobile;

0 comments on commit c92a95e

Please sign in to comment.