Skip to content

Commit c83b014

Browse files
committed
Add quotes around INIT action type in error
1 parent 12e1682 commit c83b014

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

errors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"10": "Expected the nextReducer to be a function. Instead, received: '",
1313
"11": "Expected the observer to be an object. Instead, received: ''",
1414
"12": "The slice reducer for key \"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.",
15-
"13": "The slice reducer for key \"\" returned undefined when probed with a random type. Don't try to handle or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.",
15+
"13": "The slice reducer for key \"\" returned undefined when probed with a random type. Don't try to handle '' or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.",
1616
"14": "When called with an action of type , the slice reducer for key \"\" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.",
1717
"15": "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.",
1818
"16": "bindActionCreators expected an object or a function, but instead received: ''. Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?"

src/combineReducers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function assertReducerShape(reducers: ReducersMapObject) {
8282
) {
8383
throw new Error(
8484
`The slice reducer for key "${key}" returned undefined when probed with a random type. ` +
85-
`Don't try to handle ${ActionTypes.INIT} or other actions in "redux/*" ` +
85+
`Don't try to handle '${ActionTypes.INIT}' or other actions in "redux/*" ` +
8686
`namespace. They are considered private. Instead, you must return the ` +
8787
`current state for any unknown actions, unless it is undefined, ` +
8888
`in which case you must return the initial state, regardless of the ` +

src/createStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default function createStore<
114114
let isDispatching = false
115115

116116
/**
117-
* This makes a shallow copy of currentListeners so can use
117+
* This makes a shallow copy of currentListeners so we can use
118118
* nextListeners as a temporary list while dispatching.
119119
*
120120
* This prevents any bugs around consumers calling

0 commit comments

Comments
 (0)