diff --git a/packages/rrweb-snapshot/src/utils.ts b/packages/rrweb-snapshot/src/utils.ts index a443cb96c1..110cf1a735 100644 --- a/packages/rrweb-snapshot/src/utils.ts +++ b/packages/rrweb-snapshot/src/utils.ts @@ -256,6 +256,7 @@ export function isNodeMetaEqual(a: serializedNode, b: serializedNode): boolean { * where passwords should be masked. */ export function getInputType(element: HTMLElement): Lowercase | null { + // when omitting the type of input element(e.g. ), the type is treated as text const type = (element as HTMLInputElement).type; return element.hasAttribute('data-rr-is-password')