denoland/deno_blog

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

s-uei opened this issue · 1 comments

s-uei commented

Hi.

I found a bug in composeMiddlewares.

const mws = state.middlewares?.reverse();

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().

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