swagger-client 3.32.1 → 3.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/swagger-client.browser.js +3 -5
- package/dist/swagger-client.browser.min.js +1 -1
- package/dist/swagger-client.browser.min.js.map +1 -1
- package/es/execute/oas3/style-serializer.js +3 -2
- package/es/http/serializers/request/index.js +1 -3
- package/lib/execute/oas3/style-serializer.js +3 -2
- package/lib/http/serializers/request/index.js +1 -3
- package/package.json +1 -1
|
@@ -856,10 +856,10 @@ function valueEncoder(value, escape = false) {
|
|
|
856
856
|
} else if (typeof value === 'number' || typeof value === 'boolean') {
|
|
857
857
|
value = String(value);
|
|
858
858
|
}
|
|
859
|
-
if (escape && value.length > 0) {
|
|
859
|
+
if (escape && typeof value === 'string' && value.length > 0) {
|
|
860
860
|
return encodeCharacters(value, escape);
|
|
861
861
|
}
|
|
862
|
-
return value;
|
|
862
|
+
return value ?? '';
|
|
863
863
|
}
|
|
864
864
|
function encodeArray({
|
|
865
865
|
key,
|
|
@@ -1951,9 +1951,7 @@ const stringifyQuery = (queryObject, {
|
|
|
1951
1951
|
encode = true
|
|
1952
1952
|
} = {}) => {
|
|
1953
1953
|
const buildNestedParams = (params, key, value) => {
|
|
1954
|
-
if (value
|
|
1955
|
-
params.append(key, '');
|
|
1956
|
-
} else if (Array.isArray(value)) {
|
|
1954
|
+
if (Array.isArray(value)) {
|
|
1957
1955
|
value.reduce((acc, v) => buildNestedParams(params, key, v), params);
|
|
1958
1956
|
} else if (value instanceof Date) {
|
|
1959
1957
|
params.append(key, value.toISOString());
|