From a2c8a1a37bfcf8389b280af792262c8263a979a3 Mon Sep 17 00:00:00 2001 From: Alexey Babik Date: Fri, 21 Jun 2024 10:10:03 -0700 Subject: [PATCH] Fix maskInputFn is ignored during the creation of the full snapshot (#1386) Fix that the optional `maskInputFn` was being accidentally ignored during the creation of the full snapshot --- .changeset/beige-olives-roll.md | 6 ++++++ packages/rrweb-snapshot/src/snapshot.ts | 2 +- packages/rrweb/src/record/index.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/beige-olives-roll.md diff --git a/.changeset/beige-olives-roll.md b/.changeset/beige-olives-roll.md new file mode 100644 index 0000000000..4707f55aca --- /dev/null +++ b/.changeset/beige-olives-roll.md @@ -0,0 +1,6 @@ +--- +"rrweb-snapshot": patch +"rrweb": patch +--- + +Fix that the optional `maskInputFn` was being accidentally ignored during the creation of the full snapshot diff --git a/packages/rrweb-snapshot/src/snapshot.ts b/packages/rrweb-snapshot/src/snapshot.ts index ba9ef0448a..00e1571c25 100644 --- a/packages/rrweb-snapshot/src/snapshot.ts +++ b/packages/rrweb-snapshot/src/snapshot.ts @@ -1271,7 +1271,7 @@ function snapshot( inlineStylesheet?: boolean; maskAllInputs?: boolean | MaskInputOptions; maskTextFn?: MaskTextFn; - maskInputFn?: MaskTextFn; + maskInputFn?: MaskInputFn; slimDOM?: 'all' | boolean | SlimDOMOptions; dataURLOptions?: DataURLOptions; inlineImages?: boolean; diff --git a/packages/rrweb/src/record/index.ts b/packages/rrweb/src/record/index.ts index ffc6f88b6d..e302c0de00 100644 --- a/packages/rrweb/src/record/index.ts +++ b/packages/rrweb/src/record/index.ts @@ -383,6 +383,7 @@ function record( inlineStylesheet, maskAllInputs: maskInputOptions, maskTextFn, + maskInputFn, slimDOM: slimDOMOptions, dataURLOptions, recordCanvas,