Skip to content
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

Fix : wrong value in VolumeUnits steps when creating a new rule #4889

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Atala
Copy link
Member

@Atala Atala commented Feb 6, 2025

No description provided.

@vladimir-8 vladimir-8 self-requested a review February 10, 2025 16:26

const newUnit = e.target.value

if (newUnit === 'vu') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bug if the switch is between units that are both multiplied (kg, km); it needs an extra check that the current unit is 1000x (kg, km) and the newUnit is not (vu), and vice versa:

Screenshot 2025-02-10 at 14 35 17

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be add a helper to check if a unit is multiplied or not instead of hard-coding 'vu' to allow adding more units

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants