mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Add extra value checking to enable adding tags with value '' from text area.
This commit is contained in:
@@ -21,7 +21,7 @@ export function utilTagDiff(oldTags, newTags) {
|
||||
var oldVal = oldTags[k];
|
||||
var newVal = newTags[k];
|
||||
|
||||
if (oldVal && (!newVal || newVal !== oldVal)) {
|
||||
if ((oldVal || oldVal === '') && (!newVal || newVal !== oldVal)) {
|
||||
tagDiff.push({
|
||||
type: '-',
|
||||
key: k,
|
||||
@@ -30,7 +30,7 @@ export function utilTagDiff(oldTags, newTags) {
|
||||
display: '- ' + k + '=' + oldVal
|
||||
});
|
||||
}
|
||||
if (newVal && (!oldVal || newVal !== oldVal)) {
|
||||
if ((newVal || newVal === '') && (!oldVal || newVal !== oldVal)) {
|
||||
tagDiff.push({
|
||||
type: '+',
|
||||
key: k,
|
||||
|
||||
Reference in New Issue
Block a user