From d9a4d6cbdefbe70e47583f5575f7c3d47c347261 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Sat, 12 Nov 2022 22:03:28 +0100 Subject: [PATCH] Fix crash when multiselection has differing values in combo field closes #9369 --- CHANGELOG.md | 5 ++--- modules/ui/fields/combo.js | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9b69d634..e39517e82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,13 +40,12 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :sparkles: Usability & Accessibility #### :white_check_mark: Validation #### :bug: Bugfixes +* Fix crash when performing a multiselection of objects with differing tags values in a combo field ([#9369]) #### :hourglass: Performance #### :rocket: Presets #### :hammer: Development -[#xxxx]: https://github.com/openstreetmap/iD/issues/xxxx -[#xxxx]: https://github.com/openstreetmap/iD/pull/xxxx -[@xxxx]: https://github.com/xxxx +[#9369]: https://github.com/openstreetmap/iD/issues/9369 # 2.23.0 diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index a6029ad13..d27198bdd 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -685,7 +685,9 @@ export function uiFieldCombo(field, context) { } }); - updateIcon(tags[field.key]); + if (!Array.isArray(tags[field.key])) { + updateIcon(tags[field.key]); + } } };