denoland / deno_blog

Minimal boilerplate blogging.
MIT License
477 stars 100 forks source link

The order of middleware is changed round and round every time. #92

Closed s-uei closed 1 year ago

s-uei commented 2 years ago

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 of state.middlrewares change every time.

I recommend using slice().reverse() instead of reverse().

lino-levan commented 1 year ago

93 got merged, shouldn't this issue be closed?