diff --git a/packages/rrweb/src/record/observer.ts b/packages/rrweb/src/record/observer.ts index c4838f44..8bdd7cad 100644 --- a/packages/rrweb/src/record/observer.ts +++ b/packages/rrweb/src/record/observer.ts @@ -598,6 +598,47 @@ function initStyleSheetObserver( }; } + // Queue for insertRule calls that arrive before the MutationObserver has + // added the ownerNode to the mirror (race condition with CSS-in-JS libraries + // like Emotion that call insertRule synchronously after creating