You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we always assume that the results include the category that was requested, but technically that's not the case - i.e. Lighthouse v12 removed the PWA category which we were using in an app, meaning it started erroring very generically due to trying to do nil * 100.
def category
category = results.dig('categories', @audit.to_s)
raise Error, "Category '#{@audit}' not found in Lighthouse results - maybe it was removed?" if category.nil?
category
end
The text was updated successfully, but these errors were encountered:
Currently we always assume that the results include the category that was requested, but technically that's not the case - i.e. Lighthouse v12 removed the PWA category which we were using in an app, meaning it started erroring very generically due to trying to do
nil * 100
.Lighthouse does not seem to validate the values passed which I've opened an issue for improving, but ultimately we should handle this gracefully too.
I've got a basic patch for this already:
The text was updated successfully, but these errors were encountered: