Skip to content

Commit 7334d98

Browse files
fix(Param): Mark all query parameters as optional
1 parent adb1fc8 commit 7334d98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/params/param.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class Param {
8080
type = getType(config, type, location, id, urlMatcherFactory.paramTypes);
8181
let arrayMode = getArrayMode();
8282
type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;
83-
let isOptional = config.value !== undefined;
83+
let isOptional = config.value !== undefined || location === DefType.SEARCH;
8484
let dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;
8585
let raw = isDefined(config.raw) ? !!config.raw : !!type.raw;
8686
let squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy());

0 commit comments

Comments
 (0)