Skip to content

Commit

Permalink
fix(router): throw 404 for intermediate matches
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 15, 2022
1 parent e2c2144 commit 43db151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function createRouter (opts: CreateRouterOptions = {}): Router {

// Match route
const matched = _router.lookup(path);
if (!matched) {
if (!matched || !matched.handlers) {
if (opts.preemtive) {
throw createError({
statusCode: 404,
Expand Down

0 comments on commit 43db151

Please sign in to comment.