From 704f711dde79016634899ac8d68cca58fe21db22 Mon Sep 17 00:00:00 2001 From: Isa Ibrahim Date: Mon, 2 Apr 2018 00:34:48 +0100 Subject: [PATCH] changed const to let in applyMiddleware (#2915) changed const to let in applyMiddleware function in Attempt #6 --- docs/advanced/Middleware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) )