Skip to content

Commit

Permalink
Apply formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eoghanmurray authored and github-actions[bot] committed Aug 20, 2024
1 parent 2c3bc01 commit c593165
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions packages/rrdom/test/diff/dialog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import {
Mirror as NodeMirror,
serializedNodeWithId,
} from 'rrweb-snapshot';
import {
NodeType as RRNodeType,
} from '@rrweb/types';
import { NodeType as RRNodeType } from '@rrweb/types';
import { RRDocument } from '../../src';
import { diff, ReplayerHandler } from '../../src/diff';

Expand Down
7 changes: 5 additions & 2 deletions packages/rrweb-snapshot/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,14 @@ export function stringifyStylesheet(s: CSSStyleSheet): string | null {
}
}

export function stringifyCssRules(rules: CSSRuleList, sheetHref: string | null): string {
export function stringifyCssRules(
rules: CSSRuleList,
sheetHref: string | null,
): string {
const stringifiedRules = Array.from(rules, (rule: CSSRule) =>
stringifyRule(rule, sheetHref),
).join('');
return fixBrowserCompatibilityIssuesInCSS(stringifiedRules);
return fixBrowserCompatibilityIssuesInCSS(stringifiedRules);
}

export function stringifyRule(rule: CSSRule, sheetHref: string | null): string {
Expand Down
5 changes: 1 addition & 4 deletions packages/rrweb/src/record/observers/asset-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,7 @@ export default class AssetManager {
}
const processStylesheet = () => {
cssRules = el.sheet!.cssRules; // update, as a mutation may have since occurred
const cssText = stringifyCssRules(
cssRules,
sheetBaseHref,
);
const cssText = stringifyCssRules(cssRules, sheetBaseHref);
const payload: SerializedCssTextArg = {
rr_type: 'CssText',
cssTexts: [cssText],
Expand Down

0 comments on commit c593165

Please sign in to comment.