diff --git a/src/ReactCursorPosition.js b/src/ReactCursorPosition.js index 24e3fed8..7f5f8ec7 100644 --- a/src/ReactCursorPosition.js +++ b/src/ReactCursorPosition.js @@ -472,8 +472,9 @@ export default class extends React.Component { } getPassThroughProps() { - const ownPropNames = Object.keys(this.constructor.propTypes); - return omit(this.props, ownPropNames); + const ownPropNames = Object.keys(this.constructor.propTypes || {}); + if (ownPropNames.length) + return omit(this.props, ownPropNames); } render() {