diff --git a/packages/react-devtools-shared/src/devtools/store.js b/packages/react-devtools-shared/src/devtools/store.js index 45ced5d4fdd..2a560b38646 100644 --- a/packages/react-devtools-shared/src/devtools/store.js +++ b/packages/react-devtools-shared/src/devtools/store.js @@ -1572,17 +1572,18 @@ export default class Store extends EventEmitter<{ const id = operations[i]; const element = this._idToElement.get(id); + i += 1; if (element === undefined) { - this._throwAndEmitError( - Error( - `Cannot remove node "${id}" because no matching node was found in the Store.`, - ), - ); - - break; + /* + - there may be further nodes in the batch to be processed hence throwing error right now is not a good soln + - Our store may be partially updated because of this logic + - So I changed it to look for further nodes and skip removing this node + - logically as it is absent so its better logically + */ + continue; } - i += 1; + const {children, ownerID, parentID, weight} = element; if (children.length > 0) {