simplify isSafari isFirefox

main
Mike Fix 4 years ago
parent 44927fc3f9
commit ba149c2b65
No known key found for this signature in database
GPG Key ID: 1D85E862314CA79F

@ -78,15 +78,15 @@ class Editor extends React.Component {
this.setState(newState) this.setState(newState)
if (window.navigator) {
this.isSafari = this.isSafari =
window.navigator &&
window.navigator.userAgent.indexOf('Safari') !== -1 && window.navigator.userAgent.indexOf('Safari') !== -1 &&
window.navigator.userAgent.indexOf('Chrome') === -1 window.navigator.userAgent.indexOf('Chrome') === -1
this.isFirefox = this.isFirefox =
window.navigator &&
window.navigator.userAgent.indexOf('Firefox') !== -1 && window.navigator.userAgent.indexOf('Firefox') !== -1 &&
window.navigator.userAgent.indexOf('Chrome') === -1 window.navigator.userAgent.indexOf('Chrome') === -1
} }
}
carbonNode = React.createRef() carbonNode = React.createRef()

Loading…
Cancel
Save