forked from MapComplete/MapComplete
Chore: sort code, improve error messages
This commit is contained in:
parent
cfeabe4d22
commit
6ed31b9f10
2 changed files with 29 additions and 30 deletions
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue