diff --git a/src/combineReducers.js b/src/combineReducers.js index c44e29cbdf..109cd36996 100644 --- a/src/combineReducers.js +++ b/src/combineReducers.js @@ -4,10 +4,10 @@ import warning from './utils/warning' function getUndefinedStateErrorMessage(key, action) { const actionType = action && action.type - const actionName = (actionType && `"${actionType.toString()}"`) || 'an action' + const actionDescription = (actionType && `action "${String(actionType)}"`) || 'an action' return ( - `Given action ${actionName}, reducer "${key}" returned undefined. ` + + `Given ${actionDescription}, reducer "${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.` )