@samitouri / QOS-React / commits / 4b0424fbed

Flow fix

Brian Vaughn committed Apr 10, 2019 at 10:16 UTC 4b0424fbed8b873d67684785bfbdf22323cb3125
1 file changed +1 -1
src/devtools/views/Components/TreeContext.js
+1 -1
@@ -407,7 +407,7 @@ function reduceOwnersState(store: Store, state: State, action: Action): State {
407 ownerStackIndex = ownerStack.length - 1;
408 }
409 }
410 - if (selectedElementID !== null) {
410 + if (selectedElementID !== null && _ownerFlatTree !== null) {
411 // Mutation might have caused the index of this ID to shift.
412 selectedElementIndex = _ownerFlatTree.indexOf(selectedElementID);
413 }