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)); }