Skip to content

Commit fddb4eb

Browse files
pwNNjosepot
authored andcommitted
fix: optimize invariant message (reduxjs#852)
Utilizing `methodName` option in invariant messages
1 parent 85ad242 commit fddb4eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/connectAdvanced.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default function connectAdvanced(
9090
invariant(
9191
typeof WrappedComponent == 'function',
9292
`You must pass a component to the function returned by ` +
93-
`connect. Instead received ${JSON.stringify(WrappedComponent)}`
93+
`${methodName}. Instead received ${JSON.stringify(WrappedComponent)}`
9494
)
9595

9696
const wrappedComponentName = WrappedComponent.displayName

0 commit comments

Comments
 (0)