Contexts: stop spewing tombstones everywhere

This commit is contained in:
Alex Gleason 2022-05-13 16:34:45 -05:00
parent 75745d2c46
commit b4e27e5dcd
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 3 additions and 2 deletions

View File

@ -106,9 +106,10 @@ const getRootNode = (state: State, statusId: string, initialId = statusId): stri
/** Route fromId to toId by inserting tombstones. */ /** Route fromId to toId by inserting tombstones. */
const connectNodes = (state: State, fromId: string, toId: string): State => { 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); return insertTombstone(state, toId, fromId);
} else { } else {
return state; return state;