From 9306e6cbe6a45043259d9be7bf5b04191052b32e Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Thu, 18 Mar 2021 14:25:44 +0000 Subject: [PATCH] Ensure selectedItem has a value --- views/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/index.html b/views/index.html index 4590dba..3b69f41 100644 --- a/views/index.html +++ b/views/index.html @@ -424,7 +424,7 @@ .then(res => res.json()) .then(items => { if (!this.showRead) { - if (!items.some(i => i.ID == this.selectedItem)) { + if (this.selectedItem && !items.some(i => i.ID == this.selectedItem)) { items.unshift(this.items.find(i => i.ID == this.selectedItem)); }