Added check in deleteStatus function in timelines reducer for if timeline in map exists

• Added:
- check in deleteStatus function in timelines reducer for if timeline in map exists

• Fixes:
- Issue when muting an account it shows "success" then "fail" toasts
This commit is contained in:
mgabdev 2020-12-31 18:55:00 -05:00
parent 3809700f17
commit 985faeb930

View File

@ -118,7 +118,7 @@ const updateTimelineQueue = (state, timeline, status) => {
const deleteStatus = (state, id, accountId, references, exclude_account = null) => {
state.keySeq().forEach(timeline => {
if (exclude_account === null || (timeline !== `account:${exclude_account}` && !timeline.startsWith(`account:${exclude_account}:`)))
if (exclude_account === null || (!!timeline && timeline !== `account:${exclude_account}` && !timeline.startsWith(`account:${exclude_account}:`)))
state = state.updateIn([timeline, 'items'], list => list.filterNot(item => item === id));
});