Skip to content

Commit 147402f

Browse files
authored
Prevent crashes incase nav.platform is undefined
1 parent e13f164 commit 147402f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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.indexOf(type) !== -1 || (nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream))
33+
nav && nav.platform && (nav.platform.indexOf(type) !== -1 || (nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream))
3434
);
3535
};

0 commit comments

Comments
 (0)