Skip to content

Commit e32b952

Browse files
committed
nav reducer: Pin down a type fixme more narrowly.
This makes more explicit exactly what the type mismatch is that this $FlowFixMe is marking, which will make it more robust to the refactoring we're about to do.
1 parent 5d1b5b0 commit e32b952

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nav/navReducers.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ const rehydrate = (state: NavigationState, action: RehydrateAction): NavigationS
4040
const rehydratedState = action.payload;
4141
if (!hasAuth(rehydratedState)) {
4242
const { accounts } = rehydratedState;
43+
const result = getStateForRoute(accounts && accounts.length > 1 ? 'account' : 'welcome');
4344
// getStateForRoute can return null, but it is unclear under what
4445
// conditions. Empirically, it doesn't return null on the initial start of
4546
// the app, but this should be verified.
4647
// $FlowFixMe: getStateForRoute may return null but it shouldn't.
47-
return getStateForRoute(accounts && accounts.length > 1 ? 'account' : 'welcome');
48+
return (result: NavigationState);
4849
}
4950

5051
const startState = getStateForRoute('main');

0 commit comments

Comments
 (0)