We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adb1fc8 commit 7334d98Copy full SHA for 7334d98
src/params/param.ts
@@ -80,7 +80,7 @@ export class Param {
80
type = getType(config, type, location, id, urlMatcherFactory.paramTypes);
81
let arrayMode = getArrayMode();
82
type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;
83
- let isOptional = config.value !== undefined;
+ let isOptional = config.value !== undefined || location === DefType.SEARCH;
84
let dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;
85
let raw = isDefined(config.raw) ? !!config.raw : !!type.raw;
86
let squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy());
0 commit comments