Skip to content

Commit 2b692c1

Browse files
Merge pull request #18 from markusguenther/update_HOC_without_functionname
Allows theming of HOC and components without a function name
2 parents bcc489d + 262077a commit 2b692c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/themr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default (componentName, localTheme, options = {}) => (ThemedComponent) =>
5454
* @property {{wrappedInstance: *}} refs
5555
*/
5656
class Themed extends Component {
57-
static displayName = `Themed${ThemedComponent.name}`;
57+
static displayName = `Themed${(ThemedComponent.displayName || ThemedComponent.name || "Component")}`;
5858

5959
static contextTypes = {
6060
themr: PropTypes.object

0 commit comments

Comments
 (0)