Skip to content

Commit 704f711

Browse files
isahgagamarkerikson
authored andcommitted
changed const to let in applyMiddleware (#2915)
changed const to let in applyMiddleware function in Attempt #6
1 parent 8c5fbc1 commit 704f711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/advanced/Middleware.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Instead of `applyMiddlewareByMonkeypatching()`, we could write `applyMiddleware(
253253
function applyMiddleware(store, middlewares) {
254254
middlewares = middlewares.slice()
255255
middlewares.reverse()
256-
const dispatch = store.dispatch
256+
let dispatch = store.dispatch
257257
middlewares.forEach(middleware =>
258258
dispatch = middleware(store)(dispatch)
259259
)

0 commit comments

Comments
 (0)