Skip to content

Commit

Permalink
upgrade example storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Jan 4, 2024
1 parent c7c8a80 commit bf62ea8
Show file tree
Hide file tree
Showing 2 changed files with 3,482 additions and 5,145 deletions.
13 changes: 4 additions & 9 deletions packages/docs/public/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/* tslint:disable */

/**
* Mock Service Worker (2.0.9).
* Mock Service Worker (2.0.11).
* @see https://github.com/mswjs/msw
* - Please do NOT modify this file.
* - Please do NOT serve this file on production.
*/

const INTEGRITY_CHECKSUM = '0877fcdc026242810f5bfde0d7178db4'
const INTEGRITY_CHECKSUM = 'c5f7f8e188b673ea4e677df7ea3c5a39'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()

Expand Down Expand Up @@ -121,11 +121,6 @@ async function handleRequest(event, requestId) {
if (client && activeClientIds.has(client.id)) {
;(async function () {
const responseClone = response.clone()
// When performing original requests, response body will
// always be a ReadableStream, even for 204 responses.
// But when creating a new Response instance on the client,
// the body for a 204 response must be null.
const responseBody = response.status === 204 ? null : responseClone.body

sendToClient(
client,
Expand All @@ -137,11 +132,11 @@ async function handleRequest(event, requestId) {
type: responseClone.type,
status: responseClone.status,
statusText: responseClone.statusText,
body: responseBody,
body: responseClone.body,
headers: Object.fromEntries(responseClone.headers.entries()),
},
},
[responseBody],
[responseClone.body],
)
})()
}
Expand Down

0 comments on commit bf62ea8

Please sign in to comment.