don't split values in semiCombo fields split with , in descriptions

fixes #9471
This commit is contained in:
Martin Raifer
2023-01-18 19:10:09 +01:00
parent b0b080cb64
commit 4b83dceec1
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -44,6 +44,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :bug: Bugfixes
* Fix bug which made it impossible to change an object's preset from a sub-preset to the respective parents preset (e.g. from Driveway to Service Road) ([#9372])
* Fix corruption of (directional) `cycleway` tags when editing a multi-selection ([#9423])
* Fix unintended splitting of tag values in `semiCombo` fields into two values when the description contains a comma ([#9471])
#### :hourglass: Performance
* Speed up "outdated tags" validation by optimizing order of operations ([#9434], thanks [@Zaczero])
#### :rocket: Presets
@@ -67,6 +68,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
[#9413]: https://github.com/openstreetmap/iD/pull/9413
[#9423]: https://github.com/openstreetmap/iD/pull/9423
[#9434]: https://github.com/openstreetmap/iD/pull/9434
[#9471]: https://github.com/openstreetmap/iD/issues/9471
[@alanb43]: https://github.com/alanb43
[@Rewinteer]: https://github.com/Rewinteer
[@Zaczero]: https://github.com/Zaczero
+2 -1
View File
@@ -353,7 +353,8 @@ export function uiFieldCombo(field, context) {
if (_isMulti) {
vals = [tagValue(utilGetSetValue(_input))];
} else if (_isSemi) {
val = tagValue(utilGetSetValue(_input).replace(/,/g, ';')) || '';
val = tagValue(utilGetSetValue(_input)) || '';
val = val.replace(/,/g, ';');
vals = val.split(';');
}
vals = vals.filter(Boolean);