From f3d85e22f3dc919e0b9f5f508fa604591801a410 Mon Sep 17 00:00:00 2001 From: James Berry Date: Wed, 1 Feb 2023 19:02:02 +0000 Subject: [PATCH] rn initiatorTypes --- packages/rrweb/src/plugins/network/record/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/rrweb/src/plugins/network/record/index.ts b/packages/rrweb/src/plugins/network/record/index.ts index 77758bbe97..72c163e2b1 100644 --- a/packages/rrweb/src/plugins/network/record/index.ts +++ b/packages/rrweb/src/plugins/network/record/index.ts @@ -26,7 +26,7 @@ export type InitiatorType = | 'xmlhttprequest'; type NetworkRecordOptions = { - initiatorType?: InitiatorType[]; + initiatorTypes?: InitiatorType[]; ignoreRequestFn?: (data: NetworkRequest) => boolean; recordHeaders?: | boolean @@ -46,7 +46,7 @@ type NetworkRecordOptions = { }; const defaultNetworkOptions: NetworkRecordOptions = { - initiatorType: [ + initiatorTypes: [ 'audio', 'beacon', 'body', @@ -151,7 +151,7 @@ function initXhrObserver( win: IWindow, options: Required, ): listenerHandler { - if (!options.initiatorType.includes('xmlhttprequest')) { + if (!options.initiatorTypes.includes('xmlhttprequest')) { return () => { // }; @@ -166,7 +166,7 @@ function initFetchObserver( win: IWindow, options: Required, ): listenerHandler { - if (!options.initiatorType.includes('fetch')) { + if (!options.initiatorTypes.includes('fetch')) { return () => { // };