14841: Don't defer initializing sessions 14841-link-workbench1
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Mon, 25 Feb 2019 21:51:33 +0000 (16:51 -0500)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Mon, 25 Feb 2019 21:51:33 +0000 (16:51 -0500)
It breaks tests or something.

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

src/store/auth/auth-action.ts

index 1654f5140f7c32036c560178aa17382d26f269f8..baf80595f300ad9fb7d181aa8ba5441303e71aab 100644 (file)
@@ -53,9 +53,9 @@ export const initAuth = (config: Config) => (dispatch: Dispatch, getState: () =>
     dispatch(authActions.CONFIG({ config }));
     if (token && user) {
         dispatch(authActions.INIT({ user, token }));
+        dispatch<any>(initSessions(services.authService, config, user));
         dispatch<any>(getUserDetails()).then((user: User) => {
             dispatch(authActions.INIT({ user, token }));
-            dispatch<any>(initSessions(services.authService, config, user));
         });
     }
 };