From 68b8a445f3f71bac551814c5322be0dcb229b38f Mon Sep 17 00:00:00 2001 From: Alexander Hubmann-Haidvogel Date: Sat, 31 Aug 2024 09:56:38 +0200 Subject: [PATCH] double-check message existence on end headers --- src/chrome/content/threadvis.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/chrome/content/threadvis.mjs b/src/chrome/content/threadvis.mjs index 9f4b55d..91705e5 100644 --- a/src/chrome/content/threadvis.mjs +++ b/src/chrome/content/threadvis.mjs @@ -181,9 +181,11 @@ export class ThreadVis { } onEndHeaders() { - this.#setSelectedMessage(this.#window.gMessage, true); - // make sure we correctly underline recipients (as header is re-drawn) - this.#visualisation.recolourAuthors(); + if (this.#window.gMessage) { + this.#setSelectedMessage(this.#window.gMessage, true); + // make sure we correctly underline recipients (as header is re-drawn) + this.#visualisation.recolourAuthors(); + } } get window() {