From b33667a74342a9fc91386d12763b5c2f1101868a Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 4 Sep 2019 22:17:29 +0300 Subject: [PATCH] Avoid iterating over statuses to set thread_muted if the backend does not support the extension --- src/modules/statuses.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 9ba32976..918065d2 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -430,7 +430,9 @@ export const mutations = { const newStatus = state.allStatusesObject[status.id] newStatus.thread_muted = status.thread_muted - state.conversationsObject[newStatus.statusnet_conversation_id].forEach(status => { status.thread_muted = newStatus.thread_muted }) + if (newStatus.thread_muted !== undefined) { + state.conversationsObject[newStatus.statusnet_conversation_id].forEach(status => { status.thread_muted = newStatus.thread_muted }) + } }, setRetweeted (state, { status, value }) { const newStatus = state.allStatusesObject[status.id]