Closed s-uei closed 1 year ago
Hi.
I found a bug in composeMiddlewares.
composeMiddlewares
https://github.com/denoland/deno_blog/blob/36cc6c3c578a1e42247bad6b5aa2b36dce6b6643/blog.tsx#L138
The reverse function change the array of caller by breaking. The order of state.middlrewares change every time.
reverse
state.middlrewares
I recommend using slice().reverse() instead of reverse().
slice().reverse()
reverse()
Hi.
I found a bug in
composeMiddlewares
.https://github.com/denoland/deno_blog/blob/36cc6c3c578a1e42247bad6b5aa2b36dce6b6643/blog.tsx#L138
The
reverse
function change the array of caller by breaking. The order ofstate.middlrewares
change every time.I recommend using
slice().reverse()
instead ofreverse()
.