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.
This commit is contained in:
Jonas Jenwald 2026-03-10 15:33:09 +01:00
parent 5ef582fb20
commit bfa2753f3c

View File

@ -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(
([
{