There was an issue with how the MeasurementUnits.kt class handled non-predefined measurement units and conversion between them. Specifically, there was a problem when trying to convert CUPS into GRAMS. This was fixed by ensuring that an error is not thrown in this situation and by adding try-catch blocks around the units conversion to prevent the app from crashing. If any issues occur when converting units, a default value of 1.0 is used or an empty list.
Bugfix
There was an issue with how the
MeasurementUnits.kt
class handled non-predefined measurement units and conversion between them. Specifically, there was a problem when trying to convertCUPS
intoGRAMS
. This was fixed by ensuring that an error is not thrown in this situation and by adding try-catch blocks around the units conversion to prevent the app from crashing. If any issues occur when converting units, a default value of 1.0 is used or an empty list.