Contexts: stop spewing tombstones everywhere

sidenav-improvements
Alex Gleason 2022-05-13 16:34:45 -05:00
rodzic 75745d2c46
commit b4e27e5dcd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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;