Skip to content

Commit ec4345c

Browse files
toger5robintown
andauthored
Update src/UrlParams.ts
Co-authored-by: Robin <robin@robin.town>
1 parent c9a2481 commit ec4345c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/UrlParams.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class ParamParser {
268268
type: { [s: string]: T } | ArrayLike<T>,
269269
): T | undefined {
270270
const value = this.getParam(name);
271-
if (value && Object.values(type).includes(value as T)) {
271+
if (value !== null && Object.values(type).includes(value as T)) {
272272
return value as T;
273273
}
274274
return undefined;

0 commit comments

Comments
 (0)