Skip to content

Commit 26f1ed0

Browse files
authored
missing await for response.text()
1 parent 9597cda commit 26f1ed0

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)