Skip to content

Commit ce25e96

Browse files
nleclercsofisl
andauthored
fix: don't iterate over undefined opts.data. (#711)
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
1 parent 07dee65 commit ce25e96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/packages/gaxios/src/gaxios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export class Gaxios implements FetchCompliance {
196196
if (opts.responseType === 'stream') {
197197
const response = [];
198198

199-
for await (const chunk of opts.data as Readable) {
199+
for await (const chunk of (opts.data ?? []) as Readable) {
200200
response.push(chunk);
201201
}
202202

0 commit comments

Comments
 (0)