Skip to content

Commit 012d8b9

Browse files
committed
refactor(compiler): only warn for not supported regexp
unblocks full testing
1 parent ba1eba0 commit 012d8b9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/compiler.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@ const _compileMethodMatch = (
4848
for (let i = 0; i < paramsMap.length; i++) {
4949
const map = paramsMap[i];
5050

51-
if (typeof map[1] !== "string")
52-
throw new Error("Compiler does not handle regexp parameter name");
51+
if (typeof map[1] !== "string") {
52+
console.warn(
53+
`regexp route params are not supported in compiler mode yet, skipping`,
54+
map[1],
55+
);
56+
continue; // TODO
57+
}
5358

5459
// Select proper parameter
5560
str += `${JSON.stringify(map[1])}:${params[i]},`;

0 commit comments

Comments
 (0)