Skip to content

Commit ad4630f

Browse files
committed
Don't assume Function.prototype exists (it doesn't for ES2015 arrow functions)
1 parent 54b1d9a commit ad4630f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default function renderToString(vnode, context, opts, inner) {
8989
let props = { children, ...attributes },
9090
rendered;
9191

92-
if (typeof nodeName.prototype.render!=='function') {
92+
if (!nodeName.prototype || typeof nodeName.prototype.render!=='function') {
9393
// stateless functional components
9494
rendered = nodeName(props, context);
9595
}

0 commit comments

Comments
 (0)