1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

modify: change the file where detect Internet disconnection

This commit is contained in:
Sosuke Suzuki
2017-12-05 19:23:49 +09:00
parent f54b49db1a
commit bdb3406dcb
2 changed files with 2 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ const os = require('os')
let mobileAnalyticsClient
AWS.config.region = 'us-east-1'
if (process.env.NODE_ENV === 'production' && ConfigManager.default.get().amaEnabled) {
if (process.env.NODE_ENV === 'production' && ConfigManager.default.get().amaEnabled && window.navigator.onLine) {
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:xxxxxxxxxxxxxxxxxxxxxxxxx'
})