diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-06-15 11:31:59 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-06-15 11:31:59 -0300 |
| commit | 232ef95ae4918d7fd699c0a9e87b3ca4371d5224 (patch) | |
| tree | 1a148b537ecf0122033f4522cf4cf1acd512d82d /app/app.android.js | |
| parent | 8471c7bfd8ffdf9b0452d00cf7826660be41b569 (diff) | |
| parent | 9b340b1c62c9bd94365245f8d29b62262f70089c (diff) | |
| download | mullvadvpn-232ef95ae4918d7fd699c0a9e87b3ca4371d5224.tar.xz mullvadvpn-232ef95ae4918d7fd699c0a9e87b3ca4371d5224.zip | |
Merge branch 'backend-error-types'
Diffstat (limited to 'app/app.android.js')
| -rw-r--r-- | app/app.android.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/app.android.js b/app/app.android.js index 38bb927a93..d362f25283 100644 --- a/app/app.android.js +++ b/app/app.android.js @@ -8,7 +8,7 @@ import { createMemoryHistory } from 'history'; import makeRoutes from './routes'; import configureStore from './redux/store'; import { log } from './lib/platform'; -import { Backend, BackendError } from './lib/backend'; +import { Backend, NoAccountError } from './lib/backend'; import { DeviceEventEmitter } from 'react-native'; import { MobileAppBridge } from 'NativeModules'; import { Dimensions } from 'react-native'; @@ -31,11 +31,9 @@ DeviceEventEmitter.addListener('com.mullvad.backend-info', async (_event, args) await backend.fetchSecurityState(); await backend.connect(); } catch (e) { - if (e instanceof BackendError) { - if (e.type === 'NO_ACCOUNT') { - log.debug('No user set in the backend, showing window'); - MobileAppBridge.showWindow(); - } + if (e instanceof NoAccountError) { + log.debug('No previously configured account set, showing window'); + MobileAppBridge.showWindow(); } } }); |
