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,14 +78,14 @@ class Editor extends React.Component {
this.setState(newState)
this.isSafari =
window.navigator &&
window.navigator.userAgent.indexOf('Safari') !== -1 &&
window.navigator.userAgent.indexOf('Chrome') === -1
this.isFirefox =
window.navigator &&
window.navigator.userAgent.indexOf('Firefox') !== -1 &&
window.navigator.userAgent.indexOf('Chrome') === -1
if (window.navigator) {
this.isSafari =
window.navigator.userAgent.indexOf('Safari') !== -1 &&
window.navigator.userAgent.indexOf('Chrome') === -1
this.isFirefox =
window.navigator.userAgent.indexOf('Firefox') !== -1 &&
window.navigator.userAgent.indexOf('Chrome') === -1
}
}
carbonNode = React.createRef()

Loading…
Cancel
Save