]> git.scottworley.com Git - vopamoi/commitdiff
Disallow empty-string as a tag name
authorScott Worley <scottworley@scottworley.com>
Thu, 27 Jan 2022 20:13:49 +0000 (12:13 -0800)
committerScott Worley <scottworley@scottworley.com>
Thu, 27 Jan 2022 20:22:18 +0000 (12:22 -0800)
vopamoi.ts

index a6f85f2dc53864577c98445de5b7606b80eb4ac7..6e511a5e67c6172cdb273bc78d8e2c3b1bce04d2 100644 (file)
@@ -284,7 +284,7 @@ function BrowserUI() {
       input.removeEventListener("blur", this.completeTagEdit);
       task.removeChild(input);
       task.focus();
-      if (!Model.hasTag(task, newTagName)) {
+      if (newTagName && !Model.hasTag(task, newTagName)) {
         ui.addTag(task.getAttribute("data-created")!, newTagName);
         lastTagNameEntered = newTagName;
       }