Skip to content

Commit

Permalink
feat: judgeDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
galaxy-s10 committed Aug 31, 2023
1 parent 9576d71 commit 4419a60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/bom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ export const judgeDevice = () => {
const ua = navigator.userAgent;
const isAndroid = /(Android)/i.test(ua);
const isIphone = /(iPhone|iPad|iPod|iOS)/i.test(ua);
const isIPadRes = isIPad();

return { isAndroid, isIphone };
return { isAndroid, isIphone, isIPad: isIPadRes };
};

/**
Expand Down

0 comments on commit 4419a60

Please sign in to comment.