aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-07-23 20:59:38 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-07-23 20:59:38 +0200
commit4d60dbb6efe2ac318ae6f549691107c2d2f9ff5c (patch)
tree4f8df75481f852934277418edc2f4be28eb8b837
parentd474bf9ec01bf8b7190d9ba08a8f9eda4f160b43 (diff)
downloadfietsboek-4d60dbb6efe2ac318ae6f549691107c2d2f9ff5c.tar.gz
fietsboek-4d60dbb6efe2ac318ae6f549691107c2d2f9ff5c.tar.bz2
fietsboek-4d60dbb6efe2ac318ae6f549691107c2d2f9ff5c.zip
don't add empty tags
-rw-r--r--fietsboek/static/fietsboek.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/fietsboek/static/fietsboek.js b/fietsboek/static/fietsboek.js
index d58da60..265032e 100644
--- a/fietsboek/static/fietsboek.js
+++ b/fietsboek/static/fietsboek.js
@@ -26,6 +26,9 @@ addHandler(".tag-badge", "click", tagClicked);
*/
function addTag() {
const newTag = document.querySelector("#new-tag");
+ if (newTag.value === "") {
+ return;
+ }
const node = document.createElement("span");
node.classList.add("tag-badge");
node.classList.add("badge");