Open soulprovidr opened 11 months ago
It seems like the getEncodedValueArray
function could be modified, although I might be blind to potential side effects:
function getEncodedValueArray(
input: string | (string | null)[] | null | undefined
): (string | null)[] | null | undefined {
if (input == null) {
return input;
}
return input instanceof Array ? input : input === '' ? [''] : [input]; // Empty string no longer returns empty array
}
Hi – first of all, thanks for your work on this library.
I ran into what I believe is a bug today and would like to understand if there is any way to work around it.
Given the following param definition:
Expected behaviour:
foo
value?foo=bar&foo=
['bar', '']
?foo=
['']
Actual behaviour:
foo
value?foo=bar&foo=
['bar', '']
?foo=
[]