From 0ad0b268bc799f316843ef07f50cebfb72964f5f Mon Sep 17 00:00:00 2001 From: shibafu Date: Wed, 26 Jun 2019 23:23:06 +0900 Subject: [PATCH] =?UTF-8?q?=E6=97=A2=E3=81=AB=E5=85=A5=E5=8A=9B=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8B=E3=82=BF=E3=82=B0=E3=82=92?= =?UTF-8?q?=E4=BA=8C=E9=87=8D=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/components/TagInput.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/components/TagInput.vue b/resources/assets/js/components/TagInput.vue index 5da6bfb..6c7908e 100644 --- a/resources/assets/js/components/TagInput.vue +++ b/resources/assets/js/components/TagInput.vue @@ -30,7 +30,7 @@ buffer: string = ""; created() { - bus.$on("add-tag", (tag: string) => this.tags.push(tag)); + bus.$on("add-tag", (tag: string) => this.tags.indexOf(tag) === -1 && this.tags.push(tag)); } onKeyDown(event: KeyboardEvent) { @@ -79,4 +79,4 @@ border: 0; outline: 0; } - \ No newline at end of file +