Skip to content

Commit 26ec46d

Browse files
committed
Fix bug
1 parent f63245b commit 26ec46d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dist/performance.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ async function getSpeculationRules() {
347347
// Get rules from Speculation-Rules HTTP responses
348348
// There is an assumption this is actually used on the page(e.g. it could be fetched manually from JS and
349349
// then not used, rather than fetched by browser from HTTP header), but think that's rare enough so OK.
350-
const httpRules = response_bodies
350+
const httpRules = Array.from(
351+
response_bodies
351352
.filter(req => getParameterCaseInsensitive(req.response_headers, 'content-type') === 'application/speculationrules+json')
352353
.map(req => {
353354
try {
@@ -356,6 +357,7 @@ async function getSpeculationRules() {
356357
return {url: req.url, errorName: error.name, errorMessage: error.message};
357358
}
358359
})
360+
);
359361

360362
return {htmlRules: htmlRules, httpHeaderRules: httpRules};
361363
}

0 commit comments

Comments
 (0)