Skip to content

Commit

Permalink
Prettier ran
Browse files Browse the repository at this point in the history
  • Loading branch information
skitterm committed Oct 22, 2024
1 parent d238191 commit 2ebf5ab
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/rrweb-snapshot/src/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,11 @@ function buildNode(
*/
if (!node.shadowRoot) {
node.attachShadow({ mode: 'open' });
n.rrwebAdoptedStylesheets?.forEach(
(rrwebAdoptedStylesheet) => {
const styleSheet = new CSSStyleSheet();
styleSheet.replaceSync(rrwebAdoptedStylesheet);
node.shadowRoot?.adoptedStyleSheets.push(styleSheet);
},
);
n.rrwebAdoptedStylesheets?.forEach((rrwebAdoptedStylesheet) => {
const styleSheet = new CSSStyleSheet();
styleSheet.replaceSync(rrwebAdoptedStylesheet);
node.shadowRoot?.adoptedStyleSheets.push(styleSheet);
});
} else {
while (node.shadowRoot.firstChild) {
node.shadowRoot.removeChild(node.shadowRoot.firstChild);
Expand Down

0 comments on commit 2ebf5ab

Please sign in to comment.