Skip to content

Commit

Permalink
fix: composeMiddleware should not change parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Val-istar-Guo committed May 22, 2024
1 parent f4b418f commit 131c1d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/compose-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function composeMiddleware(middlewares: KeqMiddleware[]): KeqMiddleware {
throw new Exception('At least one middleware')
}

const middleware = middlewares
const middleware = [...middlewares]
.reverse()
.reduce(function (prev, curr): KeqMiddleware {
return async (ctx, next) => {
Expand Down

0 comments on commit 131c1d4

Please sign in to comment.