Skip to content

Commit 5456cc3

Browse files
committed
Passing down the hackCss option is no longer needed
1 parent d745e3e commit 5456cc3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

packages/rrweb-snapshot/src/rebuild.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,10 @@ function buildNode(
153153
n: serializedNodeWithId,
154154
options: {
155155
doc: Document;
156-
hackCss: boolean;
157156
cache: BuildCache;
158157
},
159158
): Node | null {
160-
const { doc, hackCss, cache } = options;
159+
const { doc, cache } = options;
161160
switch (n.type) {
162161
case NodeType.Document:
163162
return doc.implementation.createDocument(null, '', null);
@@ -395,7 +394,6 @@ export function buildNodeWithSN(
395394
doc: Document;
396395
mirror: Mirror;
397396
skipChild?: boolean;
398-
hackCss: boolean;
399397
/**
400398
* This callback will be called for each of this nodes' `.childNodes` after they are appended to _this_ node.
401399
* Caveat: This callback _doesn't_ get called when this node is appended to the DOM.
@@ -408,7 +406,6 @@ export function buildNodeWithSN(
408406
doc,
409407
mirror,
410408
skipChild = false,
411-
hackCss = true,
412409
afterAppend,
413410
cache,
414411
} = options;
@@ -425,7 +422,7 @@ export function buildNodeWithSN(
425422
// For safety concern, check if the node in mirror is the same as the node we are trying to build
426423
if (isNodeMetaEqual(meta, n)) return mirror.getNode(n.id);
427424
}
428-
let node = buildNode(n, { doc, hackCss, cache });
425+
let node = buildNode(n, { doc, cache });
429426
if (!node) {
430427
return null;
431428
}
@@ -474,7 +471,6 @@ export function buildNodeWithSN(
474471
doc,
475472
mirror,
476473
skipChild: false,
477-
hackCss,
478474
afterAppend,
479475
cache,
480476
});
@@ -574,7 +570,6 @@ function rebuild(
574570
doc,
575571
mirror,
576572
skipChild: false,
577-
hackCss,
578573
afterAppend,
579574
cache,
580575
});

0 commit comments

Comments
 (0)