pl-fe: migrate drafts to mutative
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
5c58196201
commit
9f51735099
1 changed files with 6 additions and 4 deletions
|
@ -24,10 +24,12 @@ const fetchDraftStatuses = () =>
|
|||
const accountUrl = getAccount(state, state.me as string)!.url;
|
||||
|
||||
return KVStore.getItem<Array<APIEntity>>(`drafts:${accountUrl}`).then((statuses) => {
|
||||
dispatch<DraftStatusesFetchSuccessAction>({
|
||||
type: DRAFT_STATUSES_FETCH_SUCCESS,
|
||||
statuses,
|
||||
});
|
||||
if (statuses) {
|
||||
dispatch<DraftStatusesFetchSuccessAction>({
|
||||
type: DRAFT_STATUSES_FETCH_SUCCESS,
|
||||
statuses,
|
||||
});
|
||||
}
|
||||
}).catch(() => {});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue