Skip to content

Commit ac918bd

Browse files
asomethingslucasfernog
authored andcommitted
fix(http): handle status code 204 to use js null fix #2580 (#2636)
* fix(http): handle status code 204 to use javascript null * add change file --------- Co-authored-by: Lucas Nogueira <[email protected]> Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/14535438677 Co-authored-by: lucasfernog <[email protected]>
1 parent d14817f commit ac918bd

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

api-iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist-js/index.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ async function fetch(input, init) {
143143
});
144144
}
145145
});
146-
const res = new Response(readableStreamBody, {
146+
const res = new Response(status !== 204 ? readableStreamBody : null, {
147147
status,
148148
statusText
149149
});

dist-js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async function fetch(input, init) {
141141
});
142142
}
143143
});
144-
const res = new Response(readableStreamBody, {
144+
const res = new Response(status !== 204 ? readableStreamBody : null, {
145145
status,
146146
statusText
147147
});

guest-js/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export async function fetch(
262262
}
263263
})
264264

265-
const res = new Response(readableStreamBody, {
265+
const res = new Response(status !== 204 ? readableStreamBody : null, {
266266
status,
267267
statusText
268268
})

0 commit comments

Comments
 (0)