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 95e5d7b commit 93153b8Copy full SHA for 93153b8
src/combineReducers.ts
@@ -40,9 +40,13 @@ function getUnexpectedStateShapeWarningMessage(
40
}
41
42
if (!isPlainObject(inputState)) {
43
+ const match = Object.prototype.toString
44
+ .call(inputState)
45
+ .match(/\s([a-z|A-Z]+)/)
46
+ const matchType = match ? match[1] : ''
47
return (
48
`The ${argumentName} has unexpected type of "` +
- ({} as any).toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] +
49
+ matchType +
50
`". Expected argument to be an object with the following ` +
51
`keys: "${reducerKeys.join('", "')}"`
52
)
0 commit comments