From 147402f8a19cca53463d9cfa479b6549f5aeb4af Mon Sep 17 00:00:00 2001 From: "E. Wolfe" Date: Wed, 6 May 2020 19:20:45 -0700 Subject: [PATCH] Prevent crashes incase `nav.platform` is undefined --- src/components/helpers/get-ua-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/helpers/get-ua-data.js b/src/components/helpers/get-ua-data.js index 6788036..284f011 100644 --- a/src/components/helpers/get-ua-data.js +++ b/src/components/helpers/get-ua-data.js @@ -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)) ); };