From a8707405ad4ab37c00628eb228d1bdfb075d6ec2 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 6 Dec 2019 16:30:33 -0500 Subject: [PATCH] check for device_types --- ui/component/openInAppLink/view.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/component/openInAppLink/view.jsx b/ui/component/openInAppLink/view.jsx index 05dfdb30f..8ba63adef 100644 --- a/ui/component/openInAppLink/view.jsx +++ b/ui/component/openInAppLink/view.jsx @@ -28,7 +28,9 @@ function OpenInAppLink(props: Props) { const hasSrcParam = params.get('src'); const initialShouldShowNag = hasSrcParam && (isAndroid || isDesktop); const isWebUserOnly = - user && !user.device_types.some(usedDevice => usedDevice === 'mobile' || usedDevice === 'desktop'); + user && + user.device_types && + !user.device_types.some(usedDevice => usedDevice === 'mobile' || usedDevice === 'desktop'); const [hideNagForGood, setHideNagForGood] = userPersistedState('open-in-app-nag', false); const [showNag, setShowNag] = React.useState(initialShouldShowNag); let appLink = uri;