Skip to content

Commit

Permalink
fix: filter handlers in fallback request listener
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Nov 6, 2024
1 parent 3eb3090 commit 468aa2f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { XMLHttpRequestInterceptor } from '@mswjs/interceptors/XMLHttpRequest'
import { SetupWorkerInternalContext, StartOptions } from '../glossary'
import type { RequiredDeep } from '~/core/typeUtils'
import { handleRequest } from '~/core/utils/handleRequest'
import { toRequestHandlersOnly } from '~/core/utils/internal/filterRequestHandlers'

export function createFallbackRequestListener(
context: SetupWorkerInternalContext,
Expand All @@ -24,7 +25,7 @@ export function createFallbackRequestListener(
const response = await handleRequest(
request,
requestId,
context.getRequestHandlers(),
context.getRequestHandlers().filter(toRequestHandlersOnly),
options,
context.emitter,
{
Expand Down

0 comments on commit 468aa2f

Please sign in to comment.