Use 'useIfNoUnitSet' as 'defaultUnit' again

This commit is contained in:
Pieter Vander Vennet 2023-01-02 21:19:01 +01:00
parent d13a0769bc
commit 9f3ea0581a

View file

@ -116,7 +116,9 @@ export class Unit {
(u, i) =>
new Denomination(
u,
u.canonicalDenomination.trim() === json.defaultInput,
u.canonicalDenomination === undefined
? undefined
: u.canonicalDenomination.trim() === json.defaultInput,
`${ctx}.units[${i}]`
)
)