Skip to content

Commit da10cad

Browse files
committed
doInitialFetch [nfc]: Put initData declaration just before initialization
As Greg points out [1]: > Logically I'd like to think of it as a `const`, where the > declaration and initializer are inseparable. [1] #5282 (comment)
1 parent c017992 commit da10cad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/message/fetchActions.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,9 @@ export const doInitialFetch = (): ThunkAction<Promise<void>> => async (dispatch,
451451
dispatch(registerStart());
452452
const auth = getAuth(getState());
453453

454-
let initData: InitialData;
455-
456454
const haveServerData = getHaveServerData(getState());
457455

456+
let initData: InitialData;
458457
try {
459458
initData = await tryFetch(
460459
// Currently, no input we're giving `registerForEvents` is

0 commit comments

Comments
 (0)