pl-fe: remove obsolete workaround
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
5691837235
commit
5f7863f130
1 changed files with 4 additions and 8 deletions
|
@ -164,14 +164,10 @@ const fetchContext = (statusId: string, intl?: IntlShape) =>
|
||||||
} : undefined;
|
} : undefined;
|
||||||
|
|
||||||
return getClient(getState()).statuses.getContext(statusId, params).then(context => {
|
return getClient(getState()).statuses.getContext(statusId, params).then(context => {
|
||||||
if (typeof context === 'object') {
|
|
||||||
const { ancestors, descendants } = context;
|
const { ancestors, descendants } = context;
|
||||||
const statuses = ancestors.concat(descendants);
|
const statuses = ancestors.concat(descendants);
|
||||||
dispatch(importFetchedStatuses(statuses));
|
dispatch(importFetchedStatuses(statuses));
|
||||||
dispatch({ type: CONTEXT_FETCH_SUCCESS, statusId, ancestors, descendants });
|
dispatch({ type: CONTEXT_FETCH_SUCCESS, statusId, ancestors, descendants });
|
||||||
} else {
|
|
||||||
throw context;
|
|
||||||
}
|
|
||||||
return context;
|
return context;
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (error.response?.status === 404) {
|
if (error.response?.status === 404) {
|
||||||
|
|
Loading…
Reference in a new issue