Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Fix errors on safari and opera #594
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunkat committed Apr 7, 2017
1 parent fc03bf5 commit d6bd922
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/containers/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ class Login extends Component {
}

userBrowser = () => {
let opr;
let safari;

const isChrome = !!window.chrome && !!window.chrome.webstore;

const isFirefox = typeof InstallTrigger !== 'undefined';

const isSafari = /constructor/i.test(window.HTMLElement) ||
(function (p) { return p.toString() ===
'[object SafariRemoteNotification]'; })(!window['safari'] ||
safari.pushNotification);
const isOpera = (!!window.opr && !!opr.addons) || !!window.opera ||
navigator.userAgent.indexOf(' OPR/') >= 0;
const isSafari = navigator.vendor &&
navigator.vendor.indexOf('Apple') > -1 &&
navigator.userAgent &&
!navigator.userAgent.match('CriOS');

const isOpera = (!!window.opr && !!window.opr.addons) ||
!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;

const isIE = /*@cc_on!@*/false || !!document.documentMode; // IE 6-11

Expand Down

0 comments on commit d6bd922

Please sign in to comment.