From 982f95a2c7dafbe0baf03d28c4c94cfdb03cc621 Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Sat, 7 Sep 2024 12:15:35 +0200 Subject: [PATCH] Fix error when NoteSelector has zero results --- src/components/NoteSelector.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/NoteSelector.vue b/src/components/NoteSelector.vue index 61e9d80..a08ac5e 100644 --- a/src/components/NoteSelector.vue +++ b/src/components/NoteSelector.vue @@ -90,6 +90,9 @@ ]), onKeydown(event) { + if (this.filteredItems.length === 0) { + return + } const path = this.filteredItems[this.selected].path if (event.key === "ArrowDown") { if (this.selected === this.filteredItems.length - 1) {