Skip to content

Commit 75378e4

Browse files
authored
Merge pull request #2361 from modernweb-dev/fix/content-type
fix: content type
2 parents 6664e5b + fd7cb03 commit 75378e4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/late-dolphins-thank.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@web/mocks": patch
3+
---
4+
5+
fix: content type

packages/mocks/storybook/decorator.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ export const withMocks = makeDecorator({
4545
? {
4646
...editedMock,
4747
handler: () =>
48-
new Response(JSON.stringify(editedMock.data), { status: editedMock.status }),
48+
new Response(JSON.stringify(editedMock.data), {
49+
headers: {
50+
'Content-Type': 'application/json',
51+
},
52+
status: editedMock.status,
53+
}),
4954
}
5055
: mock;
5156
});

0 commit comments

Comments
 (0)