From a1cfba8c2407131a8c5d6c21dc741d6319f8648a Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Tue, 5 Nov 2019 10:23:15 -0500 Subject: [PATCH] 15736: Don't redundantly load local config Somehow missed this in the last commit --- src/store/auth/auth-action.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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) })); + }); + } }); }; -- 2.30.2