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:
Quincy Morgan
2020-09-28 16:07:11 -04:00
parent 03c32d2f6a
commit 4ddd4a358b
5 changed files with 20 additions and 0 deletions
+6
View File
@@ -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]);
+1
View File
@@ -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) {