mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-12 22:26:07 +00:00
Allow for some tags (takeaway) to be kept thru a NSI upgrade
(closes #6530, closes #6581)
This commit is contained in:
@@ -102,8 +102,16 @@ export function validationOutdatedTags(context) {
|
||||
var brand = brands.brands[match.kvnd];
|
||||
if (brand && brand.tags['brand:wikidata']) {
|
||||
subtype = 'noncanonical_brand';
|
||||
nsiKeys.forEach(function(remove) { delete newTags[remove]; });
|
||||
Object.assign(newTags, brand.tags);
|
||||
|
||||
var keepTags = ['takeaway'].reduce(function(acc, k) {
|
||||
if (newTags[k]) {
|
||||
acc[k] = newTags[k];
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
nsiKeys.forEach(function(k) { delete newTags[k]; });
|
||||
Object.assign(newTags, brand.tags, keepTags);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user