From d3c0d6e2b928cbbf2d020d01846c41bddd2327e8 Mon Sep 17 00:00:00 2001 From: Max G Date: Wed, 4 Mar 2020 05:20:14 +0000 Subject: [PATCH] Creating new tags doesn't throw an error fixes #22 --- client/src/components/NoteTagEdit.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/NoteTagEdit.vue b/client/src/components/NoteTagEdit.vue index bf2f85e..07b0ea5 100644 --- a/client/src/components/NoteTagEdit.vue +++ b/client/src/components/NoteTagEdit.vue @@ -144,7 +144,7 @@ //Enter - 13 - Execute addTag() function if(code == 13){ //If an item from list is selected, make that the text - if(this.selection > -1){ + if(this.selection > -1 && this.suggestions[vm.selection]){ this.newTagInput = this.suggestions[vm.selection].text } this.addTag()