Don't add empty tags from the input box
parent
73c0d3f262
commit
3f195327ea
|
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue