From 12141bc655408e2efbc3964d50941b6a25e254bc Mon Sep 17 00:00:00 2001 From: root Date: Sun, 16 Feb 2020 20:56:58 -0400 Subject: [PATCH] Add extra value checking to enable adding tags with value '' from text area. --- modules/util/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/util/util.js b/modules/util/util.js index a7ea8675e..6f158d012 100644 --- a/modules/util/util.js +++ b/modules/util/util.js @@ -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,