report(table): handle null cells (#5075)
This commit is contained in:
Родитель
21b100fbdb
Коммит
25f920e09d
|
@ -137,7 +137,8 @@ class UnminifiedCSS extends ByteEfficiencyAudit {
|
|||
// If the ratio is minimal, the file is likely already minified, so ignore it.
|
||||
// If the total number of bytes to be saved is quite small, it's also safe to ignore.
|
||||
if (result.wastedPercent < IGNORE_THRESHOLD_IN_PERCENT ||
|
||||
result.wastedBytes < IGNORE_THRESHOLD_IN_BYTES) continue;
|
||||
result.wastedBytes < IGNORE_THRESHOLD_IN_BYTES ||
|
||||
!Number.isFinite(result.wastedBytes)) continue;
|
||||
results.push(result);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,8 @@ class UnminifiedJavaScript extends ByteEfficiencyAudit {
|
|||
// If the ratio is minimal, the file is likely already minified, so ignore it.
|
||||
// If the total number of bytes to be saved is quite small, it's also safe to ignore.
|
||||
if (result.wastedPercent < IGNORE_THRESHOLD_IN_PERCENT ||
|
||||
result.wastedBytes < IGNORE_THRESHOLD_IN_BYTES) continue;
|
||||
result.wastedBytes < IGNORE_THRESHOLD_IN_BYTES ||
|
||||
!Number.isFinite(result.wastedBytes)) continue;
|
||||
results.push(result);
|
||||
} catch (err) {
|
||||
debugString = `Unable to process ${networkRecord._url}: ${err.message}`;
|
||||
|
|
|
@ -203,7 +203,7 @@ class DetailsRenderer {
|
|||
for (const heading of details.headings) {
|
||||
const value = /** @type {number|string|!DetailsRenderer.DetailsJSON} */ (row[heading.key]);
|
||||
|
||||
if (typeof value === 'undefined') {
|
||||
if (typeof value === 'undefined' || value === null) {
|
||||
this._dom.createChildOf(rowElem, 'td', 'lh-table-column--empty');
|
||||
continue;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче