mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-28 02:42:36 +02:00
Deprecate vending=parcel_mail_in;parcel_pickup -> vending=parcel_pickup;parcel_mail_in (close #7988)
Enable upgrading of entire semicolon-delimited values
This commit is contained in:
@@ -7,9 +7,15 @@ export function actionUpgradeTags(entityId, oldTags, replaceTags) {
|
||||
var semiIndex;
|
||||
|
||||
for (var oldTagKey in oldTags) {
|
||||
// wildcard match
|
||||
if (oldTags[oldTagKey] === '*') {
|
||||
// note the value since we might need to transfer it
|
||||
transferValue = tags[oldTagKey];
|
||||
delete tags[oldTagKey];
|
||||
// exact match
|
||||
} else if (oldTags[oldTagKey] === tags[oldTagKey]) {
|
||||
delete tags[oldTagKey];
|
||||
// match is within semicolon-delimited values
|
||||
} else {
|
||||
var vals = tags[oldTagKey].split(';').filter(Boolean);
|
||||
var oldIndex = vals.indexOf(oldTags[oldTagKey]);
|
||||
|
||||
@@ -201,6 +201,7 @@ osmEntity.prototype = {
|
||||
var matchesDeprecatedTags = oldKeys.every(function(oldKey) {
|
||||
if (!tags[oldKey]) return false;
|
||||
if (d.old[oldKey] === '*') return true;
|
||||
if (d.old[oldKey] === tags[oldKey]) return true;
|
||||
|
||||
var vals = tags[oldKey].split(';').filter(Boolean);
|
||||
if (vals.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user