Skip to content

Commit

Permalink
Honour the 'omits css contents for asset managed stylesheet' test:
Browse files Browse the repository at this point in the history
    // presence of onAssetDetected means we should get
    // rr_captured_href (with contents promised later - i.e. using rrweb/record)

Not sure when this test started failing
  • Loading branch information
eoghanmurray committed Jul 10, 2024
1 parent 76400d6 commit 9695651
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/rrweb-snapshot/src/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,8 +1119,18 @@ export function serializeNodeWithId(
let { needsMask } = options;
let { preserveWhiteSpace = true } = options;

if (inlineImages) {
captureAssets.images = true;
if (onAssetDetected) {
if (captureAssets.images === undefined && inlineImages) {
captureAssets.images = true;
}
if (captureAssets.stylesheets === undefined) {
if (inlineStylesheet) {
// the prior default setting
captureAssets.stylesheets = 'without-fetch';
} else {
captureAssets.stylesheets = false;
}
}
}

if (!needsMask) {
Expand Down

0 comments on commit 9695651

Please sign in to comment.