It is throwing undefined error while calling domNode.contains() which is not defined.
Checked to find that donNode is set to component.findDOMNode() which returns a DOM Node if set (ie: component.base) or the component which is not of DOM Node type and thus has no contains member.
I am using this package to handle click outside events: https://www.npmjs.com/package/react-click-outside
It is throwing
undefined
error while callingdomNode.contains()
which is not defined. Checked to find thatdonNode
is set tocomponent.findDOMNode()
which returns a DOM Node if set (ie:component.base
) or thecomponent
which is not of DOM Node type and thus has nocontains
member.Based on this: https://facebook.github.io/react/docs/react-dom.html#finddomnode
I think that this function: https://github.com/developit/preact-compat/blob/5ca57489b75c539a0ad022f3624d97d755c939b5/src/index.js#L397-L399 ... should be something like: