mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Make sure multiData array is updated when item is removed
This commit is contained in:
@@ -236,8 +236,9 @@ export function uiFieldCombo(field, context) {
|
||||
if (isMulti) {
|
||||
t[d.key] = undefined;
|
||||
} else if (isSemi) {
|
||||
_.remove(multiData, function(md) { return md.key === d.key; });
|
||||
var arr = multiData.map(function(md) { return md.key; });
|
||||
arr = _.compact(_.uniq(_.without(arr, d.key)));
|
||||
arr = _.compact(_.uniq(arr));
|
||||
t[field.key] = arr.length ? arr.join(';') : undefined;
|
||||
}
|
||||
dispatch.call('change', this, t);
|
||||
|
||||
Reference in New Issue
Block a user