fixes(frontend): fixed small types/incorrect code

This commit is contained in:
Maieul BOYER 2025-11-10 19:16:15 +01:00 committed by Maix0
parent 16cac7e111
commit fac6df3882
5 changed files with 5 additions and 7 deletions

View file

@ -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 }
}