diff --git a/public/index.html b/public/index.html
index cf79039..e12e09a 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1394,7 +1394,7 @@
// if inbound message is for a conversation we are currently looking at, mark it as read
if(this.tab === "messages"
&& this.messagesTab === "conversations"
- && json.lxmf_message.source_hash === this.selectedPeer.destination_hash){
+ && json.lxmf_message.source_hash === this.selectedPeer?.destination_hash){
// find conversation
const conversation = this.findConversation(this.selectedPeer.destination_hash);