Skip to content

Commit 6ce1519

Browse files
authored
Correct & simplify component name detection (Fixes #44) (#45)
* Correct & simplify component name detection (Fixes #44) * fix me being silly
1 parent ae045b0 commit 6ce1519

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ export default function renderToString(vnode, context, opts, inner, isSvgMode) {
206206
}
207207

208208
function getComponentName(component) {
209-
let proto = component.prototype,
210-
ctor = proto && proto.constructor;
211-
return component.displayName || component.name || (proto && (proto.displayName || proto.name)) || getFallbackComponentName(component);
209+
return component.displayName || component!==Function && component.name || getFallbackComponentName(component);
212210
}
213211

214212
function getFallbackComponentName(component) {

0 commit comments

Comments
 (0)