We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7458311 commit 0e44ad1Copy full SHA for 0e44ad1
src/components/connectAdvanced.js
@@ -88,11 +88,13 @@ export default function connectAdvanced(
88
}
89
90
return function wrapWithConnect(WrappedComponent) {
91
- invariant(
92
- isValidElementType(WrappedComponent),
93
- `You must pass a component to the function returned by ` +
94
- `${methodName}. Instead received ${JSON.stringify(WrappedComponent)}`
95
- )
+ if (process.env.NODE_ENV !== 'production') {
+ invariant(
+ isValidElementType(WrappedComponent),
+ `You must pass a component to the function returned by ` +
+ `${methodName}. Instead received ${JSON.stringify(WrappedComponent)}`
96
+ );
97
+ }
98
99
const wrappedComponentName = WrappedComponent.displayName
100
|| WrappedComponent.name
0 commit comments