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 () => { // };