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 isClassComponent function #1571

Merged
merged 1 commit into from Oct 7, 2019

Conversation

@skyh
Copy link
Contributor

commented Oct 7, 2019

Object.getPrototypeOf(component) returns React Component() function itself, not a prototype of Component but isReactComponent is a property of Component.prototype.

So correct check here is Component.prototype.isReactComponent not Component.isReactComponent.

`Object.getPrototypeOf(component)` returns React `function Component()` function itself, not `Component.prototype`.
@codesandbox

This comment has been minimized.

Copy link

commented Oct 7, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 671a7c8:

Sandbox Source
angry-aryabhata-jboe9 Configuration
@tannerlinsley tannerlinsley merged commit 7c73a7a into tannerlinsley:master Oct 7, 2019
3 checks passed
3 checks passed
ci/codesandbox Building packages succeeded.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.