diff --git a/src/index.js b/src/index.js index 5012cc9..f24d686 100644 --- a/src/index.js +++ b/src/index.js @@ -47,7 +47,7 @@ export default function immutableStateInvariantMiddleware(options = {}) { // Track before potentially not meeting the invariant tracker = track(state); - invariant( + result.wasMutated && invariant( !result.wasMutated, INSIDE_DISPATCH_MESSAGE, (result.path || []).join('.'),