Skip to content
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

Error boundries should not unmount composite components which were not mounted. #5982

Merged
merged 1 commit into from
Feb 5, 2016

Conversation

jimfb
Copy link
Contributor

@jimfb jimfb commented Feb 5, 2016

Error boundries should not unmount composite components which were not mounted.

Fixes #5980

cc @spicyj

}

render() {
if(!this.state.error) return <div>{this.props.children}</div>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

space after if

@sophiebits
Copy link
Collaborator

What happened before? Also, can you unmount the whole thing as part of the test too?

@jimfb
Copy link
Contributor Author

jimfb commented Feb 5, 2016

When do we get our linter back??? I suppose we always have @spicyj the human linter for when babel-eslint is broken and throwing exceptions.

Before, we attempted to unmount the composite children and things would blow up with an NPE if the error had a composite sibling occurring after the angry component.

@jimfb jimfb force-pushed the error-boundaries-composite-unmount branch from 18c085d to 86305fb Compare February 5, 2016 01:11
@facebook-github-bot
Copy link

@jimfb updated the pull request.

@sophiebits
Copy link
Collaborator

So we still fail if componentWillUnmount throws somewhere in the subtree – is that right?

@sophiebits
Copy link
Collaborator

k

@jimfb
Copy link
Contributor Author

jimfb commented Feb 5, 2016

Eww, Correct.

jimfb added a commit that referenced this pull request Feb 5, 2016
Error boundries should not unmount composite components which were not mounted.
@jimfb jimfb merged commit 81e41ae into facebook:master Feb 5, 2016
@sophiebits
Copy link
Collaborator

We'll need to fix that.

@jimfb
Copy link
Contributor Author

jimfb commented Feb 5, 2016

#5983

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