fix/8129: remove rounding the caused issue with UI (https://github.com/woocommerce/woocommerce-blocks/pull/9118)

* remove rounding the caused issue with UI

* jslint autofixes

---------

Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
This commit is contained in:
Siddharth Thevaril 2023-04-20 17:11:36 +05:30 committed by GitHub
parent 7b2830eafa
commit cb378d2e9d
1 changed files with 7 additions and 10 deletions

View File

@ -148,17 +148,14 @@ const PriceSlider = ( {
}
const low =
Math.round(
100 *
( ( minPrice - minConstraint ) /
( maxConstraint - minConstraint ) )
) - 0.5;
100 *
( ( minPrice - minConstraint ) /
( maxConstraint - minConstraint ) );
const high =
Math.round(
100 *
( ( maxPrice - minConstraint ) /
( maxConstraint - minConstraint ) )
) + 0.5;
100 *
( ( maxPrice - minConstraint ) /
( maxConstraint - minConstraint ) );
return {
'--low': low + '%',