diff --git a/src/snapshot.ts b/src/snapshot.ts index 9c9a64c3..0e97033b 100644 --- a/src/snapshot.ts +++ b/src/snapshot.ts @@ -35,10 +35,7 @@ function getCssRulesString(s: CSSStyleSheet): string | null { try { const rules = s.rules || s.cssRules; return rules - ? Array.from(rules).reduce( - (prev, cur) => prev + getCssRuleString(cur), - '', - ) + ? Array.from(rules).map(getCssRuleString).join('') : null; } catch (error) { return null;