Skip to content

Commit

Permalink
simplify regex
Browse files Browse the repository at this point in the history
  • Loading branch information
jtoar committed Sep 3, 2022
1 parent 0fb5f33 commit af1ebae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/router/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export const validatePath = (path: string) => {
throw new Error(`Route path contains spaces: "${path}"`)
}

if (/\{(ref|key)([^}]*)\}/.test(path)) {
if (/\{(ref|key)/.test(path)) {
throw new Error(
[
`Route contains ref or key as a path parameter: "${path}"`,
Expand Down

0 comments on commit af1ebae

Please sign in to comment.