fixes(frontend): fixed small types/incorrect code
This commit is contained in:
parent
16cac7e111
commit
fac6df3882
5 changed files with 5 additions and 7 deletions
|
|
@ -61,7 +61,7 @@ export class RouteHandlerData {
|
|||
if (part.startsWith(':')) {
|
||||
let param_name = part.substring(1) // remove the :
|
||||
// verifiy that the parameter name only contains character, underscores and numbers (not in fist char tho)
|
||||
if (!param_name.match('^[a-zA-Z_][a-zA-Z_0-9]+$'))
|
||||
if (!param_name.match('^[a-zA-Z_][a-zA-Z_0-9]*$'))
|
||||
throw `route parameter ${idx} for url '${url}' contains illegal character`;
|
||||
return { idx, param_name, part: null }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue