Skip to content

Commit 5a18492

Browse files
bodadotshkodster28
authored andcommitted
missing await for response.text() (#20392)
* missing await for response.text() * Retrigger CI * Retrigger CI --------- Co-authored-by: boda <[email protected]> Co-authored-by: Kody Jackson <[email protected]>
1 parent 1a6ebb7 commit 5a18492

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/docs/workers/examples/fetch-json.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
if (contentType.includes("application/json")) {
3333
return { contentType, result: JSON.stringify(await response.json()) };
3434
}
35-
return { contentType, result: response.text() };
35+
return { contentType, result: await response.text() };
3636
}
3737

3838
const response = await fetch(url);
@@ -59,7 +59,7 @@ export default {
5959
if (contentType.includes("application/json")) {
6060
return { contentType, result: JSON.stringify(await response.json()) };
6161
}
62-
return { contentType, result: response.text() };
62+
return { contentType, result: await response.text() };
6363
}
6464

6565
const response = await fetch(url);

0 commit comments

Comments
 (0)