Skip to content
Commit 7f4ddc21 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Formatter: Don't try to prefix units that we don't have a prefixed version of

Otherwise we would roll over to the next unrelated unit.
For example trying to display 1000 Watts results in it trying to use
1 Watts + prefix kilo (1), which ends up at the next unit "WattHour",
which makes no sense.

Check whether the prefixed unit has the same base as the one we try to
format. We'd rather show a million Watts than the wrong unit to begin with.


(cherry picked from commit b0754b14)
parent 7b75483b
Pipeline #371831 passed with stage
in 4 minutes and 1 second
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment