From bfa2753f3cc69a3c53bf1b1f101dc5c18a2be61d Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 10 Mar 2026 15:33:09 +0100 Subject: [PATCH] Remove the "abort" listener, on the `globalAbortSignal`, in the `web/sidebar.js` file This is consistent with a bunch of other viewer code, since an `AbortSignal` can only be aborted once any "abort" listeners can thus be removed when invoked. --- web/sidebar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/sidebar.js b/web/sidebar.js index 44122528a..3aa891f8c 100644 --- a/web/sidebar.js +++ b/web/sidebar.js @@ -79,7 +79,10 @@ class Sidebar { toggleButton.addEventListener("click", this.toggle.bind(this)); this._isOpen = false; sidebar.hidden = true; - globalAbortSignal?.addEventListener("abort", this.destroy.bind(this)); + globalAbortSignal?.addEventListener("abort", this.destroy.bind(this), { + once: true, + }); + this.#resizeObserver = new ResizeObserver( ([ {