From 161cd3d1fcd7e69d4de077c2a9e3695e015237c0 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 24 Mar 2022 11:09:30 -0500 Subject: [PATCH] Revert lazy type changes to actions/instance.ts --- app/soapbox/actions/instance.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/soapbox/actions/instance.ts b/app/soapbox/actions/instance.ts index 994231c12..150e9cc86 100644 --- a/app/soapbox/actions/instance.ts +++ b/app/soapbox/actions/instance.ts @@ -59,7 +59,7 @@ export function fetchInstance() { return api(getState).get('/api/v1/instance').then(({ data: instance }: { data: Record }) => { dispatch({ type: INSTANCE_FETCH_SUCCESS, instance }); if (needsNodeinfo(instance)) { - dispatch(fetchNodeinfo() as any); // Pleroma < 2.1 backwards compatibility + dispatch(fetchNodeinfo()); // Pleroma < 2.1 backwards compatibility } }).catch(error => { console.error(error); @@ -73,10 +73,8 @@ export function loadInstance() { return (dispatch: AppDispatch, getState: () => RootState) => { const host = getHost(getState()); - if (!host) return new Promise(r => r(null)); - - return dispatch(rememberInstance(host) as any).finally(() => { - return dispatch(fetchInstance() as any); + return dispatch(rememberInstance(host)).finally(() => { + return dispatch(fetchInstance()); }); }; }