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

Fix context method for SFCs #256

Merged
merged 1 commit into from
Mar 18, 2016
Merged

Conversation

lelandrichardson
Copy link
Collaborator

Fixes #180

@@ -123,6 +123,9 @@ export default class ReactWrapper {
* @returns {ReactComponent}
*/
instance() {
if (this.root !== this) {
throw new Error('ReactWrapper::instance() can only be called on the root');
Copy link
Member

Choose a reason for hiding this comment

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

is there any test for this throw?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not explicitly... though it would have thrown before (in a different, less informative way) anyway. This method on anything but the root doesn't make a whole lot of sense

lelandrichardson added a commit that referenced this pull request Mar 18, 2016
@lelandrichardson lelandrichardson merged commit 9ffdb13 into master Mar 18, 2016
@ljharb ljharb deleted the lmr--fix-context-for-SFCs branch March 18, 2016 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants