mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 05:12:13 +02:00
Fix validator suggesting to add empty *:wikipedia tags to NSI presets (fixes #10140)
This commit is contained in:
@@ -43,6 +43,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
#### :camera: Street-Level
|
||||
#### :white_check_mark: Validation
|
||||
#### :bug: Bugfixes
|
||||
* Fix false validation message, which was suggesting to add empty `*:wikipedia` tags to NSI presets ([#10140])
|
||||
#### :earth_asia: Localization
|
||||
* Add address format for New Zealand ([#10123], thanks [@k-yle])
|
||||
#### :hourglass: Performance
|
||||
@@ -51,6 +52,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
#### :hammer: Development
|
||||
|
||||
[#10123]: https://github.com/openstreetmap/iD/pull/10123
|
||||
[#10140]: https://github.com/openstreetmap/iD/issues/10140
|
||||
|
||||
|
||||
# 2.28.0
|
||||
|
||||
@@ -248,9 +248,6 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) {
|
||||
if (_this.tags[k] || !tags[k]) {
|
||||
tags[k] = 'yes';
|
||||
}
|
||||
} else if (addTags[k] === '') {
|
||||
// empty string equates to a tag which should be removed
|
||||
delete tags[k];
|
||||
} else {
|
||||
tags[k] = addTags[k];
|
||||
}
|
||||
|
||||
@@ -87,13 +87,13 @@ function loadNsiPresets() {
|
||||
// is going to be out of sync, see #9103
|
||||
Object.values(vals[0].presets).forEach(preset => {
|
||||
if (preset.tags['brand:wikidata']) {
|
||||
preset.addTags['brand:wikipedia'] = '';
|
||||
preset.removeTags = {'brand:wikipedia': '*', ...(preset.removeTags || preset.addTags || preset.tags)};
|
||||
}
|
||||
if (preset.tags['operator:wikidata']) {
|
||||
preset.addTags['operator:wikipedia'] = '';
|
||||
preset.removeTags = {'operator:wikipedia': '*', ...(preset.removeTags || preset.addTags || preset.tags)};
|
||||
}
|
||||
if (preset.tags['network:wikidata']) {
|
||||
preset.addTags['network:wikipedia'] = '';
|
||||
preset.removeTags = {'network:wikipedia': '*', ...(preset.removeTags || preset.addTags || preset.tags)};
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user