File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export const generateRequestFunction = (
71
71
const explodeArrayImplementation =
72
72
explodeParameters . length > 0
73
73
? `const explodeParameters = ${ JSON . stringify ( explodeParametersNames ) } ;
74
-
74
+
75
75
if (value instanceof Array && explodeParameters.includes(key)) {
76
76
value.forEach((v) => normalizedParams.append(key, v === null ? 'null' : v.toString()));
77
77
return;
98
98
: ''
99
99
}
100
100
101
+ ${ queryParams ? `const stringifiedParams = normalizedParams.toString();` : `` }
102
+
101
103
${
102
104
queryParams
103
- ? `return normalizedParams.size ? \`${ route } ${ '?${normalizedParams.toString() }' } \` : \`${ route } \``
105
+ ? `return stringifiedParams.length > 0 ? \`${ route } ${ '?${stringifiedParams }' } \` : \`${ route } \``
104
106
: `return \`${ route } \``
105
107
}
106
108
}\n` ;
190
192
` ;
191
193
const fetchResponseImplementation = isNdJson
192
194
? `const stream = await fetch(${ fetchFnOptions } )
193
-
195
+
194
196
${ override . fetch . includeHttpResponseReturnType ? 'return { status: stream.status, stream, headers: stream.headers }' : `return stream` }
195
197
`
196
198
: `const res = await fetch(${ fetchFnOptions } )
You can’t perform that action at this time.
0 commit comments