Chore: sort code, improve error messages

This commit is contained in:
Pieter Vander Vennet 2025-04-08 02:55:32 +02:00
parent cfeabe4d22
commit 6ed31b9f10
2 changed files with 29 additions and 30 deletions

View file

@ -23,11 +23,11 @@
export let getCountry = () => "?"
onMount(() => {
console.log("Setting selected unit based on country", getCountry(), upstreamValue.data)
console.log("Setting selected unit based on country", getCountry(), "and upstream value:", upstreamValue.data)
if (upstreamValue.data === undefined || upstreamValue.data === "") {
// Init the selected unit
let denomination: Denomination = unit.getDefaultDenomination(getCountry)
console.log("Found denom", denomination.canonical)
console.log("Found denom", denomination.canonical, "available denominations are:", unit.denominations.map(denom => denom.canonical))
selectedUnit.setData(denomination.canonical)
}
})