Skip to content

Commit af1ebae

Browse files
committed
simplify regex
1 parent 0fb5f33 commit af1ebae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/router/src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export const validatePath = (path: string) => {
197197
throw new Error(`Route path contains spaces: "${path}"`)
198198
}
199199

200-
if (/\{(ref|key)([^}]*)\}/.test(path)) {
200+
if (/\{(ref|key)/.test(path)) {
201201
throw new Error(
202202
[
203203
`Route contains ref or key as a path parameter: "${path}"`,

0 commit comments

Comments
 (0)