Skip to content

Commit

Permalink
don't split values in semiCombo fields split with , in descriptions
Browse files Browse the repository at this point in the history
fixes #9471
  • Loading branch information
tyrasd committed Jan 18, 2023
1 parent b0b080c commit 4b83dce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion modules/ui/fields/combo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4b83dce

Please sign in to comment.