Skip to content

Commit

Permalink
fix(hono-base): remove .matchRoute and reduce bundle size (honojs#3595
Browse files Browse the repository at this point in the history
)
  • Loading branch information
EdamAme-x authored and TinsFox committed Nov 11, 2024
1 parent 1c574ee commit bb8ce40
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/hono-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,6 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
this.routes.push(r)
}

private matchRoute(method: string, path: string) {
return this.router.match(method, path)
}

private handleError(err: unknown, c: Context<E>) {
if (err instanceof Error) {
return this.errorHandler(err, c)
Expand All @@ -406,7 +402,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
}

const path = this.getPath(request, { env })
const matchResult = this.matchRoute(method, path)
const matchResult = this.router.match(method, path)

const c = new Context(request, {
path,
Expand Down

0 comments on commit bb8ce40

Please sign in to comment.