Skip to content

Commit 74d4179

Browse files
committed
fix: simplify handler function condition in CoreRouter
1 parent 88db19a commit 74d4179

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/core/router.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -927,11 +927,7 @@ export abstract class CoreRouter {
927927
return (handlerFunction as any)(...pluginArgs)
928928
}
929929

930-
if (!metadata) {
931-
return handlerFunction(ctx, ctx.clearRequest)
932-
}
933-
934-
if (!tokens.length) {
930+
if (!metadata || !tokens.length) {
935931
return handlerFunction(ctx, ctx.clearRequest)
936932
}
937933

0 commit comments

Comments
 (0)