Skip to content

Commit

Permalink
Merge pull request #86 from ewolfe/patch-1
Browse files Browse the repository at this point in the history
Prevent crashes incase `nav.platform` is undefined
  • Loading branch information
duskload authored May 9, 2020
2 parents e13f164 + 147402f commit e9b170e
Showing 1 changed file with 1 addition and 1 deletion.
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.indexOf(type) !== -1 || (nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream))
nav && nav.platform && (nav.platform.indexOf(type) !== -1 || (nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream))
);
};

0 comments on commit e9b170e

Please sign in to comment.