msw 2.3.4 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/lib/core/HttpResponse.js +1 -1
- package/lib/core/HttpResponse.js.map +1 -1
- package/lib/core/HttpResponse.mjs +1 -1
- package/lib/core/HttpResponse.mjs.map +1 -1
- package/lib/iife/index.js +1 -1
- package/lib/iife/index.js.map +1 -1
- package/lib/mockServiceWorker.js +1 -1
- package/package.json +1 -1
- package/src/core/HttpResponse.ts +1 -1
package/lib/mockServiceWorker.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Please do NOT serve this file on production.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const PACKAGE_VERSION = '2.3.
|
|
11
|
+
const PACKAGE_VERSION = '2.3.5'
|
|
12
12
|
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
|
|
13
13
|
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
|
|
14
14
|
const activeClientIds = new Set()
|
package/package.json
CHANGED
package/src/core/HttpResponse.ts
CHANGED
|
@@ -137,7 +137,7 @@ export class HttpResponse extends Response {
|
|
|
137
137
|
static arrayBuffer(body?: ArrayBuffer, init?: HttpResponseInit): Response {
|
|
138
138
|
const responseInit = normalizeResponseInit(init)
|
|
139
139
|
|
|
140
|
-
if (body) {
|
|
140
|
+
if (body && !responseInit.headers.has('Content-Length')) {
|
|
141
141
|
responseInit.headers.set('Content-Length', body.byteLength.toString())
|
|
142
142
|
}
|
|
143
143
|
|