-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report: handle non-numeric numericValues in calc link #10880
Conversation
OK, something is wrong, then. This really shouldn't happen and we should fix.
|
Yeah, something did break. The CI version of the proto test isn't seeing this problem (both missing @exterkamp is is possible the PSI proto handling is diverging from the library we're using on the null/default value front? |
|
Either way, this change is a net positive, can we merge? |
lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js
Outdated
Show resolved
Hide resolved
@@ -117,7 +117,7 @@ class PerformanceCategoryRenderer extends CategoryRenderer { | |||
if (fmp) v5andv6metrics.push(fmp); | |||
|
|||
const metricPairs = v5andv6metrics.map(audit => { | |||
const value = typeof audit.result.numericValue !== 'undefined' ? | |||
const value = typeof audit.result.numericValue === 'number' ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fix went in with #10954
Whelp.. in LR, our undefined's become null and we end up throwing.
definitely shoulda gone with this version of the typeof check to begin with. :/
this is a 6.0.1 fix. i imagine we've already hit it in PSI a couple times