diff --git a/docs/advanced/Middleware.md b/docs/advanced/Middleware.md index 1c5f344169..31f1d8bf3c 100644 --- a/docs/advanced/Middleware.md +++ b/docs/advanced/Middleware.md @@ -253,7 +253,7 @@ Instead of `applyMiddlewareByMonkeypatching()`, we could write `applyMiddleware( function applyMiddleware(store, middlewares) { middlewares = middlewares.slice() middlewares.reverse() - const dispatch = store.dispatch + let dispatch = store.dispatch middlewares.forEach(middleware => dispatch = middleware(store)(dispatch) )