Skip to content

Commit ee5c563

Browse files
Ben Brostofftimdorr
Ben Brostoff
authored andcommitted
Remove unneeded chain declaration (#2928)
1 parent 7cb7414 commit ee5c563

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/applyMiddleware.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ export default function applyMiddleware(...middlewares) {
2525
`Other middleware would not be applied to this dispatch.`
2626
)
2727
}
28-
let chain = []
2928

3029
const middlewareAPI = {
3130
getState: store.getState,
3231
dispatch: (...args) => dispatch(...args)
3332
}
34-
chain = middlewares.map(middleware => middleware(middlewareAPI))
33+
const chain = middlewares.map(middleware => middleware(middlewareAPI))
3534
dispatch = compose(...chain)(store.dispatch)
3635

3736
return {

0 commit comments

Comments
 (0)