Looking at a site in the wild I see the following in the page source:
"minViewportAspectRatio":0.40000000000000002220446049250313080847263336181640625,"maxViewportAspectRatio":2.5
This is a laughable minViewportAspectRatio. Nevertheless, the values 0.4 and 2.5 are what show up in the source:
|
return (float) apply_filters( 'od_minimum_viewport_aspect_ratio', 0.4 ); |
|
return (float) apply_filters( 'od_maximum_viewport_aspect_ratio', 2.5 ); |
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:
|
$detect_args = array( |
|
'minViewportAspectRatio' => od_get_minimum_viewport_aspect_ratio(), |
|
'maxViewportAspectRatio' => od_get_maximum_viewport_aspect_ratio(), |
|
wp_json_encode( $detect_args ) |
Not a big issue.
Looking at a site in the wild I see the following in the page source:
This is a laughable
minViewportAspectRatio. Nevertheless, the values0.4and2.5are 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.