Merge: develop

This commit is contained in:
Pieter Vander Vennet 2023-06-11 02:32:14 +02:00
commit 9cffe6814e
154 changed files with 1199 additions and 41754 deletions

View file

@ -122,6 +122,10 @@ export class Unit {
`${ctx}.units[${i}]`
)
)
if(json.defaultInput && !applicable.some(denom => denom.canonical.trim() === json.defaultInput)){
throw `${ctx}: no denomination has the specified default denomination. The default denomination is '${json.defaultInput}', but the available denominations are ${applicable.map(denom => denom.canonical).join(", ")}`
}
return new Unit(appliesTo, applicable, json.eraseInvalidValues ?? false)
}