diff --git a/src/utils.js b/src/utils.js index 63a20dd..cd5a8dd 100755 --- a/src/utils.js +++ b/src/utils.js @@ -288,7 +288,10 @@ export function flexRender(Comp, props) { function isClassComponent(component) { return ( typeof component === 'function' && - !!Object.getPrototypeOf(component).isReactComponent + !!(() => { + let proto = Object.getPrototypeOf(component) + return proto.prototype && proto.prototype.isReactComponent + })() ) }