From: Peter Amstutz Date: Tue, 5 Nov 2019 15:23:15 +0000 (-0500) Subject: 15736: Don't redundantly load local config X-Git-Tag: 2.0.0~30^2~2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/a1cfba8c2407131a8c5d6c21dc741d6319f8648a?ds=sidebyside 15736: Don't redundantly load local config Somehow missed this in the last commit --- diff --git a/src/store/auth/auth-action.ts b/src/store/auth/auth-action.ts index bfec39be..e394d62d 100644 --- a/src/store/auth/auth-action.ts +++ b/src/store/auth/auth-action.ts @@ -85,16 +85,18 @@ const init = (config: Config) => (dispatch: Dispatch, getState: () => RootState, if (err.response) { // Bad token if (err.response.status === 401) { - logout()(dispatch, getState, services); + dispatch(logout()); } } }); } Object.keys(config.remoteHosts).map((k) => { - Axios.get(getClusterConfigURL(config.remoteHosts[k])) - .then(response => { - dispatch(authActions.REMOTE_CLUSTER_CONFIG({ config: buildConfig(response.data) })); - }); + if (k !== config.uuidPrefix) { + Axios.get(getClusterConfigURL(config.remoteHosts[k])) + .then(response => { + dispatch(authActions.REMOTE_CLUSTER_CONFIG({ config: buildConfig(response.data) })); + }); + } }); };