Update src/UrlParams.ts

Co-authored-by: Robin <robin@robin.town>
This commit is contained in:
Timo
2025-07-24 12:26:50 +02:00
committed by Timo
parent 4a9e97071d
commit 586bbb81b8

View File

@@ -263,7 +263,7 @@ class ParamParser {
type: { [s: string]: T } | ArrayLike<T>,
): T | undefined {
const value = this.getParam(name);
if (value && Object.values(type).includes(value as T)) {
if (value !== null && Object.values(type).includes(value as T)) {
return value as T;
}
return undefined;