Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
typed node
  • Loading branch information
daibhin committed Nov 1, 2024
commit 040e94107308034af13dfe49463477a7aea87dc6
5 changes: 3 additions & 2 deletions packages/rrdom/src/diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { NodeType as RRNodeType } from '@rrweb/types';
import type {
canvasMutationData,
canvasEventWithTime,
elementNode,
inputData,
scrollData,
styleDeclarationData,
Expand Down Expand Up @@ -338,8 +339,8 @@ function diffProps(

for (const name in newAttributes) {
const newValue = newAttributes[name];
const sn = rrnodeMirror.getMeta(newTree);
if (sn?.type == RRNodeType.Element && sn?.isSVG && NAMESPACES[name])
const sn = rrnodeMirror.getMeta(newTree) as elementNode | null;
if (sn?.isSVG && NAMESPACES[name])
oldTree.setAttributeNS(NAMESPACES[name], name, newValue);
else if (newTree.tagName === 'CANVAS' && name === 'rr_dataURL') {
const image = document.createElement('img');
Expand Down
Loading