Skip to content

Commit

Permalink
fix: optimize invariant message (reduxjs#852)
Browse files Browse the repository at this point in the history
Utilizing `methodName` option in invariant messages
  • Loading branch information
pwNN authored and josepot committed Sep 21, 2018
1 parent 85ad242 commit fddb4eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/connectAdvanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default function connectAdvanced(
invariant(
typeof WrappedComponent == 'function',
`You must pass a component to the function returned by ` +
`connect. Instead received ${JSON.stringify(WrappedComponent)}`
`${methodName}. Instead received ${JSON.stringify(WrappedComponent)}`
)

const wrappedComponentName = WrappedComponent.displayName
Expand Down

0 comments on commit fddb4eb

Please sign in to comment.