dillon1000/react

Commit

Add clearer invariant in processUpdates

The `updatedChildren[j].parentNode.removeChild(updatedChildren[j]);` line below can fail if (1) we're moving/moving the same node twice or (2) the node we're looking for is gone completely. This makes it easier to distinguish between the two cases.

Perf shouldn't be a concern here because this is DOM code and invariants are fast in comparison.

Test Plan: grunt test
Browse files
Changed paths1 file
First-parent comparison
M src/browser/ui/dom/DOMChildrenOperations.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…