From 10907e4898303eb4cbbce1c9273029ef80993fe4 Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Mon, 23 Oct 2023 11:18:20 -0400 Subject: [PATCH 1/3] fix(rrweb): Fix `rule.style` being undefined Fixes JAVASCRIPT-2MPK Closes https://github.com/getsentry/team-replay/issues/216 --- packages/rrweb/src/replay/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rrweb/src/replay/index.ts b/packages/rrweb/src/replay/index.ts index a5f26ac04a..2ffe06a199 100644 --- a/packages/rrweb/src/replay/index.ts +++ b/packages/rrweb/src/replay/index.ts @@ -1960,7 +1960,7 @@ export class Replayer { styleSheet.rules, data.index, ) as unknown as CSSStyleRule; - rule.style.setProperty( + rule.style && rule.style.setProperty( data.set.property, data.set.value, data.set.priority, @@ -1972,7 +1972,7 @@ export class Replayer { styleSheet.rules, data.index, ) as unknown as CSSStyleRule; - rule.style.removeProperty(data.remove.property); + rule.style && rule.style.removeProperty(data.remove.property); } } From de53cba94bf4abbad47eb5d7343ce97e600d7bab Mon Sep 17 00:00:00 2001 From: billyvg Date: Mon, 23 Oct 2023 15:20:06 +0000 Subject: [PATCH 2/3] Apply formatting changes --- packages/rrweb/src/replay/index.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/rrweb/src/replay/index.ts b/packages/rrweb/src/replay/index.ts index 2ffe06a199..856a14c782 100644 --- a/packages/rrweb/src/replay/index.ts +++ b/packages/rrweb/src/replay/index.ts @@ -1960,11 +1960,12 @@ export class Replayer { styleSheet.rules, data.index, ) as unknown as CSSStyleRule; - rule.style && rule.style.setProperty( - data.set.property, - data.set.value, - data.set.priority, - ); + rule.style && + rule.style.setProperty( + data.set.property, + data.set.value, + data.set.priority, + ); } if (data.remove) { From 4de683814f12398d7ab8cf5436b16fc223ecd458 Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Mon, 23 Oct 2023 11:46:29 -0400 Subject: [PATCH 3/3] force ci