From 0c5de6cea16586d7bed49803e779d64f71f73be2 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Thu, 16 Aug 2018 13:52:51 -0400 Subject: [PATCH] Detect mac vs windows --- src/components/extension-landing/extension-landing.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/extension-landing/extension-landing.jsx b/src/components/extension-landing/extension-landing.jsx index a666875b5..6c73fbd2f 100644 --- a/src/components/extension-landing/extension-landing.jsx +++ b/src/components/extension-landing/extension-landing.jsx @@ -10,8 +10,15 @@ class ExtensionLanding extends React.Component { 'onSetOS' ]); + let detectedOS = OS_ENUM.WINDOWS; + if (window.navigator && window.navigator.platform) { + if (window.navigator.platform === 'MacIntel') { + detectedOS = OS_ENUM.MACOS; + } + } + this.state = { - OS: OS_ENUM.WINDOWS + OS: detectedOS }; }