immer-reducer
Advanced tools
Comparing version
@@ -73,3 +73,3 @@ import { Draft } from "immer"; | ||
readonly state: T; | ||
readonly draftState: Draft<T>; | ||
draftState: Draft<T>; | ||
constructor(draftState: Draft<T>, state: T); | ||
@@ -76,0 +76,0 @@ } |
@@ -159,2 +159,7 @@ "use strict"; | ||
reducers[methodName].apply(reducers, getArgsFromImmerAction(action)); | ||
// The reducer replaced the instance with completely new state so | ||
// make that to be the next state | ||
if (reducers.draftState !== draftState) { | ||
return reducers.draftState; | ||
} | ||
// Workaround typing changes in Immer 3.x. This does not actually | ||
@@ -161,0 +166,0 @@ // affect the exposed types by immer-reducer itself. |
{ | ||
"name": "immer-reducer", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/immer-reducer.js", |
Sorry, the diff of this file is not supported yet
24836
1.35%266
1.92%