From b4e27e5dcdf1408a2828836a696fe0ceb7270b03 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 13 May 2022 16:34:45 -0500 Subject: [PATCH] Contexts: stop spewing tombstones everywhere --- app/soapbox/reducers/contexts.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/soapbox/reducers/contexts.ts b/app/soapbox/reducers/contexts.ts index 5cdb8de0b..219914da8 100644 --- a/app/soapbox/reducers/contexts.ts +++ b/app/soapbox/reducers/contexts.ts @@ -106,9 +106,10 @@ const getRootNode = (state: State, statusId: string, initialId = statusId): stri /** Route fromId to toId by inserting tombstones. */ const connectNodes = (state: State, fromId: string, toId: string): State => { - const root = getRootNode(state, fromId); + const fromRoot = getRootNode(state, fromId); + const toRoot = getRootNode(state, toId); - if (root !== toId) { + if (fromRoot !== toRoot) { return insertTombstone(state, toId, fromId); } else { return state;