Skip to content

Commit

Permalink
compatible with IE
Browse files Browse the repository at this point in the history
  • Loading branch information
jtemplej committed Mar 3, 2020
1 parent a3a0056 commit 48904e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/helpers/get-ua-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export const getNavigatorInstance = () => {
export const isIOS13Check = type => {
const nav = getNavigatorInstance();
return (
nav && (nav.platform.includes(type) || (nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream))
nav && (nav.platform.indexOf(type) !== -1 || (nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream))
);
};
2 changes: 1 addition & 1 deletion src/components/helpers/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const isElectronType = () => {
const nav = getNavigatorInstance();
const ua = nav && nav.userAgent.toLowerCase();

return typeof ua === 'string' ? ua.includes('electron') : false;
return typeof ua === 'string' ? /electron/.test(ua) : false;
};

const getIOS13 = () => {
Expand Down

0 comments on commit 48904e0

Please sign in to comment.