Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
A more robust method for getting the display component name
  • Loading branch information
JustinTulloss committed Jul 9, 2017
commit 1e240972cbde825e06dc19994b13d9d893be28df
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"immutable": "^3.8.1",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.4",
"opencollective": "^1.0.3"
"opencollective": "^1.0.3",
"react-display-name": "^0.2.0"
},
"peerDependencies": {
"react": "^0.14.6 || ^15.0.0"
Expand Down
3 changes: 2 additions & 1 deletion src/connect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import getDisplayName from 'react-display-name'
import { isEqual } from 'lodash'
import hoistStatics from 'hoist-non-react-statics'
import { watchEvents, unWatchEvents } from './actions/query'
Expand Down Expand Up @@ -58,7 +59,7 @@ export default (dataOrFn = []) => WrappedComponent => {
store: PropTypes.object.isRequired
};

static displayName = `FirebaseConnect(${WrappedComponent.displayName}`;
static displayName = `FirebaseConnect(${getDisplayName(WrappedComponent)}`;
static WrappedComponent = WrappedComponent;

componentWillMount () {
Expand Down