Skip to content

Commit

Permalink
add check for race in login flow (keybase#11059)
Browse files Browse the repository at this point in the history
  • Loading branch information
buoyad authored Mar 26, 2018
1 parent 648b718 commit 9cefb39
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shared/actions/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ function* navBasedOnLoginAndInitialState(): Saga.SagaGenerator<any, any> {
yield Saga.put(switchRouteDef(loginRouteTree))
yield Saga.put.resolve(getExtendedStatus())
yield Saga.call(getAccounts)
// We may have logged successfully in by now, check before trying to navigate
const state = yield Saga.select()
if (state.config.loggedIn) {
return
}
yield Saga.put(navigateTo(['login'], [loginTab]))
} else if (loginError) {
// show error on login screen
Expand Down

0 comments on commit 9cefb39

Please sign in to comment.