From 2ef3de175492e1f1c4134b43620a4f106158cbe0 Mon Sep 17 00:00:00 2001 From: Frankie Robertson Date: Tue, 5 Nov 2024 13:39:05 +0200 Subject: [PATCH] Make sure middleware is Any[] before adding ReviseMiddleware --- src/core.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core.jl b/src/core.jl index 185985c8..5b566a61 100644 --- a/src/core.jl +++ b/src/core.jl @@ -132,6 +132,7 @@ function serve(ctx::Context; if ctx.mod === nothing @warn "You are trying to use the `revise` option without @oxidise. Code in the `Main` module, which likely includes your routes, will not be tracked and revised." end + middleware = convert(Vector{Any}, middleware) insert!(middleware, 1, ReviseHandler(ctx)) end