forked from MapComplete/MapComplete
Add singular forms for units
This commit is contained in:
parent
c9ba7a8d44
commit
feeca1de46
9 changed files with 338 additions and 95 deletions
|
@ -370,7 +370,8 @@ export default class SpecialVisualizations {
|
|||
if (value === undefined) {
|
||||
return undefined
|
||||
}
|
||||
const unit = state.layoutToUse.data.units.filter(unit => unit.isApplicableToKey(key))[0]
|
||||
const allUnits = [].concat(...state.layoutToUse.data.layers.map(lyr => lyr.units))
|
||||
const unit = allUnits.filter(unit => unit.isApplicableToKey(key))[0]
|
||||
if (unit === undefined) {
|
||||
return value;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue