fix(source-maps): accept omitted names during browser collection (#2831)

This commit is contained in:
Yann Roberto
2026-10-13 22:17:09 +08:00
committed by GitHub
parent f0b8ae1fc8
commit 1016c96e6b
2 changed files with 98 additions and 5 deletions
@@ -267,11 +267,6 @@ const inspectLeaf = (
consumeRecords(budget, Array.isArray(rawNames) ? rawNames.length : 0);
consumeRecords(budget, Array.isArray(rawContents) ? rawContents.length : 0);
options.check?.();
if (options.profile === "browser-collection" && !Array.isArray(rawNames))
throw new SourceMapFormatFailure(
"format",
"Source-map leaf requires a names array.",
);
if (
options.profile === "browser-collection" &&
!hasValidSourceMapContents(