Skip to content

Commit

Permalink
Add quotes around INIT action type in error
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Apr 2, 2021
1 parent 12e1682 commit c83b014
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion errors.json
Expand Up @@ -12,7 +12,7 @@
"10": "Expected the nextReducer to be a function. Instead, received: '",
"11": "Expected the observer to be an object. Instead, received: ''",
"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.",
"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.",
"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.",
"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.",
"15": "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.",
"16": "bindActionCreators expected an object or a function, but instead received: ''. Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?"
Expand Down
2 changes: 1 addition & 1 deletion src/combineReducers.ts
Expand Up @@ -82,7 +82,7 @@ function assertReducerShape(reducers: ReducersMapObject) {
) {
throw new Error(
`The slice reducer for key "${key}" returned undefined when probed with a random type. ` +
`Don't try to handle ${ActionTypes.INIT} or other actions in "redux/*" ` +
`Don't try to handle '${ActionTypes.INIT}' 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 ` +
Expand Down
2 changes: 1 addition & 1 deletion src/createStore.ts
Expand Up @@ -114,7 +114,7 @@ export default function createStore<
let isDispatching = false

/**
* This makes a shallow copy of currentListeners so can use
* This makes a shallow copy of currentListeners so we can use
* nextListeners as a temporary list while dispatching.
*
* This prevents any bugs around consumers calling
Expand Down

0 comments on commit c83b014

Please sign in to comment.