This commit is contained in:
Brian Vaughn
2019-04-10 10:16:09 -07:00
parent 268a7cb5b4
commit 4b0424fbed
+1 -1
View File
@@ -407,7 +407,7 @@ function reduceOwnersState(store: Store, state: State, action: Action): State {
ownerStackIndex = ownerStack.length - 1;
}
}
if (selectedElementID !== null) {
if (selectedElementID !== null && _ownerFlatTree !== null) {
// Mutation might have caused the index of this ID to shift.
selectedElementIndex = _ownerFlatTree.indexOf(selectedElementID);
}