From 985faeb930a0b4014517fc2dbf80abc2ad496f94 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Thu, 31 Dec 2020 18:55:00 -0500 Subject: [PATCH] Added check in deleteStatus function in timelines reducer for if timeline in map exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • 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 --- app/javascript/gabsocial/reducers/timelines.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/gabsocial/reducers/timelines.js b/app/javascript/gabsocial/reducers/timelines.js index aaa54fca..e42c4027 100644 --- a/app/javascript/gabsocial/reducers/timelines.js +++ b/app/javascript/gabsocial/reducers/timelines.js @@ -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)); });