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()); }); }; }