chore: fix some typos (#2528)
This commit is contained in:
+2
-2
@@ -138,8 +138,8 @@ export class App<State> {
|
|||||||
const middlewares = app.#router._middlewares;
|
const middlewares = app.#router._middlewares;
|
||||||
|
|
||||||
// Special case when user calls one of these:
|
// Special case when user calls one of these:
|
||||||
// - `app.mounApp("/", otherApp)`
|
// - `app.mountApp("/", otherApp)`
|
||||||
// - `app.mounApp("*", otherApp)`
|
// - `app.mountApp("*", otherApp)`
|
||||||
const isSelf = path === "*" || path === "/";
|
const isSelf = path === "*" || path === "/";
|
||||||
if (isSelf && middlewares.length > 0) {
|
if (isSelf && middlewares.length > 0) {
|
||||||
this.#router._middlewares.push(...middlewares);
|
this.#router._middlewares.push(...middlewares);
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ export async function fsRoutes<State>(
|
|||||||
let parent = mod.path.slice(0, -"_error".length);
|
let parent = mod.path.slice(0, -"_error".length);
|
||||||
parent = parent === "/" ? "*" : parent + "*";
|
parent = parent === "/" ? "*" : parent + "*";
|
||||||
|
|
||||||
// Add error route as it's own route
|
// Add error route as its own route
|
||||||
if (!specialPaths.has(mod.path)) {
|
if (!specialPaths.has(mod.path)) {
|
||||||
specialPaths.add(mod.path);
|
specialPaths.add(mod.path);
|
||||||
app.all(
|
app.all(
|
||||||
|
|||||||
Reference in New Issue
Block a user