Skip to content

Commit e9b170e

Browse files
authored
Merge pull request #86 from ewolfe/patch-1
Prevent crashes incase `nav.platform` is undefined
2 parents e13f164 + 147402f commit e9b170e

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)