fix: basePath not applied to app.route() (#3116)
Fixes https://github.com/denoland/fresh/issues/3115
This commit is contained in:
+4
-1
@@ -301,7 +301,10 @@ export class App<State> {
|
||||
ensureHandler(route);
|
||||
middlewares.push((ctx) => renderRoute(ctx, route));
|
||||
|
||||
const routePath = route.config?.routeOverride ?? path;
|
||||
const routePath = mergePath(
|
||||
this.config.basePath,
|
||||
route.config?.routeOverride ?? path,
|
||||
);
|
||||
|
||||
if (typeof route.handler === "function") {
|
||||
this.#addRoute("ALL", routePath, middlewares);
|
||||
|
||||
Reference in New Issue
Block a user