Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/persistReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ export default function persistReducer<State: Object, Action: Object>(
if (action.key === config.key) {
let reducedState = baseReducer(restState, action)
let inboundState = action.payload
// only reconcile state if stateReconciler and inboundState are both defined
let reconciledRest: State =
stateReconciler !== false
stateReconciler !== false && inboundState !== undefined
? stateReconciler(inboundState, state, reducedState, config)
: reducedState

Expand Down