Don't add empty tags from the input box

next
neobooru 2021-06-12 01:17:25 +02:00
parent 73c0d3f262
commit 3f195327ea
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ export default Vue.extend({
if (this.selectedPost) { if (this.selectedPost) {
const tagName = this.addTagInput; const tagName = this.addTagInput;
this.addTagInput = ""; this.addTagInput = "";
if (this.selectedPost.tags.find((x) => x.name == tagName) == undefined) { if (tagName.length > 0 && this.selectedPost.tags.find((x) => x.name == tagName) == undefined) {
this.selectedPost.tags.push(new ScrapedTag(tagName)); this.selectedPost.tags.push(new ScrapedTag(tagName));
} }
} }