facebook/react — pull request #1419 by spicyj (2014-04-16 22:09:52+00:00)
Title: 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