mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
detect internet disconnection
This commit is contained in:
@@ -20,7 +20,9 @@ class Main extends React.Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
const isOnline = window.navigator.onLine
|
||||
|
||||
if (process.env.NODE_ENV === 'production' && isOnline) {
|
||||
mobileAnalytics.initAwsMobileAnalytics()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user