Closed s-uei closed 1 year ago
I want to fix the order of calling middlewares. Now it changes by loading page. https://github.com/denoland/deno_blog/issues/92
LGTM! PTAL, @crowlKats.
LGTM! Minor issue, but it may be me only: the
slice
call's intentions were a bit confusing at first -- would a spread operator be more clear to its intentions of cloning the array?
I agree but I cannot write good vibes code because state.middlewares
maybe undefined
.
const mws = state.middlewares ? [...state.middlewares].reverse() : undefined
Ah, makes sense, thanks for the clarification!
what does this fix?