fix: frontend: sometimes plugins files are not loaded, with error 404
Massimo Melina committed
Feb 16, 2023 at 18:58 UTC
7a27e13603a9d15aaeb6eb80814e1e1c3eaeaf46
1 file changed
+1
src/plugins.ts
+1
@@ -98,6 +98,7 @@ export function pluginsMiddleware(): Koa.Middleware {
98
const name = a.shift()!
99
if (plugins.hasOwnProperty(name)) // do it only if the plugin is loaded
100
await serveFile(plugins[name]!.folder + '/public/' + a.join('/'), 'auto')(ctx, next)
101
+ return
102
}
103
await next()
104
}