Skip to content

Commit 48904e0

Browse files
committed
compatible with IE
1 parent a3a0056 commit 48904e0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/helpers/get-ua-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ export const getNavigatorInstance = () => {
3030
export const isIOS13Check = type => {
3131
const nav = getNavigatorInstance();
3232
return (
33-
nav && (nav.platform.includes(type) || (nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream))
33+
nav && (nav.platform.indexOf(type) !== -1 || (nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream))
3434
);
3535
};

src/components/helpers/selectors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const isElectronType = () => {
3434
const nav = getNavigatorInstance();
3535
const ua = nav && nav.userAgent.toLowerCase();
3636

37-
return typeof ua === 'string' ? ua.includes('electron') : false;
37+
return typeof ua === 'string' ? /electron/.test(ua) : false;
3838
};
3939

4040
const getIOS13 = () => {

0 commit comments

Comments
 (0)