Skip to content

Added an invariant to throw instead of potentially failing to terminate on unexpected condition. #4502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jimfb
Copy link
Contributor

@jimfb jimfb commented Jul 27, 2015

Added an invariant to throw instead of potentially failing to terminate on unexpected condition.

@@ -128,6 +129,16 @@ function handleTopLevelWithPath(bookKeeping) {
// Jump to the root of this React render tree
while (currentPathElementID !== newRootID) {
i++;
if (i > path.length) {
if (__DEV__) {
invariant(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev and prod should remain the same - we shouldn't throw in only 1 environment.

@jimfb jimfb force-pushed the fallback-to-old-algorithm branch from afc55e4 to 04f070f Compare July 28, 2015 05:19
@jimfb
Copy link
Contributor Author

jimfb commented Aug 4, 2015

Going to abandon this in favor of #4558

@jimfb jimfb closed this Aug 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants