Skip to content

Commit

Permalink
Do not declare isReactComponent (#25)
Browse files Browse the repository at this point in the history
Do not declare isReactComponent

Detailed explanation of the problem: facebook/react#13580
Working demo of the bug: https://codesandbox.io/s/nm1nn0374
  • Loading branch information
jacekradko authored and ethanselzer committed Sep 8, 2018
1 parent 855b112 commit e257bda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ReactCursorPosition.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,14 @@ export default class extends React.Component {
return e.touches[0];
}

isReactComponent(reactElement) {
getIsReactComponent(reactElement) {
return typeof reactElement.type === 'function';
}

shouldDecorateChild(child) {
return (
!!child &&
this.isReactComponent(child) &&
this.getIsReactComponent(child) &&
this.props.shouldDecorateChildren
);
}
Expand Down

0 comments on commit e257bda

Please sign in to comment.