forked from MapComplete/MapComplete
Fix: multianswer would not accept last option
This commit is contained in:
parent
138b2ada2f
commit
6f5c71ed5a
2 changed files with 6 additions and 2 deletions
|
@ -46,7 +46,7 @@
|
|||
// We received a new config -> reinit
|
||||
unit = layer.units.find(unit => unit.appliesToKeys.has(config.freeform?.key))
|
||||
|
||||
if (config.mappings?.length > 0 && (checkedMappings === undefined || checkedMappings?.length < config.mappings.length)) {
|
||||
if (config.mappings?.length > 0 && (checkedMappings === undefined || (checkedMappings?.length + 1) < config.mappings.length)) {
|
||||
checkedMappings = [...config.mappings.map(_ => false), false /*One element extra in case a freeform value is added*/];
|
||||
}
|
||||
if (config.freeform?.key) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue