Skip to content

Commit

Permalink
fixed bug by adding getDisplayName()
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Rasmussen committed Aug 25, 2015
1 parent 4c5c563 commit 9693b71
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "map-props",
"version": "0.1.0",
"version": "0.1.1",
"description": "A higher order component to map React props",
"main": "./lib/index.js",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions src/mapProps.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component} from 'react';
import {getDisplayName} from './util';

export default function mapProps(mapping) {
return DecoratedComponent =>
Expand Down
3 changes: 3 additions & 0 deletions src/util.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function getDisplayName(Comp) {
return Comp.displayName || Comp.name || 'Component';
}

0 comments on commit 9693b71

Please sign in to comment.