Min/max aspect ratios should be be rounded to a fixed nearest decimal #1765
Labels
[Plugin] Optimization Detective
Issues for the Optimization Detective plugin
[Type] Bug
An existing feature is broken
Looking at a site in the wild I see the following in the page source:
This is a laughable
minViewportAspectRatio
. Nevertheless, the values0.4
and2.5
are what show up in the source:performance/plugins/optimization-detective/storage/data.php
Line 313 in ebec285
performance/plugins/optimization-detective/storage/data.php
Line 335 in ebec285
Aren't floating point numbers fun.
I'm not sure how having such a long decimal would be prevented, as the return value of the functions there is sent straight to be exported as JSON here:
performance/plugins/optimization-detective/detection.php
Lines 91 to 93 in ebec285
performance/plugins/optimization-detective/detection.php
Line 122 in ebec285
Not a big issue.
The text was updated successfully, but these errors were encountered: