From 683b98df6daa0333cdcf3c2d7c2b7a45f74b61c4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 5 Jun 2017 19:36:33 -0400 Subject: fixing obnoxious scroll bug --- client/src/lib/components/browser.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/lib/components/browser.js') diff --git a/client/src/lib/components/browser.js b/client/src/lib/components/browser.js index 2ef33c5..37af2aa 100644 --- a/client/src/lib/components/browser.js +++ b/client/src/lib/components/browser.js @@ -1,9 +1,9 @@ -const isIphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) -const isIpad = (navigator.userAgent.match(/iPad/i)) -const isAndroid = (navigator.userAgent.match(/Android/i)) +const isIphone = !!( (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) ) +const isIpad = !! (navigator.userAgent.match(/iPad/i)) +const isAndroid = !! (navigator.userAgent.match(/Android/i)) const isMobile = isIphone || isIpad || isAndroid const isDesktop = ! isMobile -const isFirefox = navigator.userAgent.match('Firefox') +const isFirefox = !! navigator.userAgent.match('Firefox') export default { isIphone, -- cgit v1.2.3-70-g09d2