Skip to content

Commit 0ad7f82

Browse files
committed
fix: handle empty ruleset
1 parent 00143f5 commit 0ad7f82

File tree

1 file changed

+4
-0
lines changed
  • packages/runtime/src/templates/edge-shared

1 file changed

+4
-0
lines changed

packages/runtime/src/templates/edge-shared/router.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ export function applyRewriteRules({
222222
checkStaticRoutes?: boolean
223223
staticRoutes?: Set<string>
224224
}): Request | false {
225+
if (!rules?.length) {
226+
return false
227+
}
228+
225229
let result: Request | false = false
226230

227231
if (checkStaticRoutes && !staticRoutes) {

0 commit comments

Comments
 (0)