Update packages/playwright-ct-core/src/router.ts

Signed-off-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
Max Schmitt 2024-11-11 11:37:08 +01:00 committed by GitHub
parent 5f450668dc
commit 41694bdcb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,7 +70,7 @@ async function globalFetch(...args: Parameters<typeof globalThis.fetch>) {
// pre 2.6.4
headers.delete('x-msw-intention');
// post 2.6.4
const accept = headers.get('accept')?.split(',').filter(h => !h.includes('msw/')).join(', ');
const accept = headers.get('accept')?.split(',').filter(h => !h.includes('msw/')).join(',');
if (accept)
headers.set('accept', accept);
else