Skip to content

Commit bfa2753

Browse files
committed
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.
1 parent 5ef582f commit bfa2753

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

web/sidebar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ class Sidebar {
7979
toggleButton.addEventListener("click", this.toggle.bind(this));
8080
this._isOpen = false;
8181
sidebar.hidden = true;
82-
globalAbortSignal?.addEventListener("abort", this.destroy.bind(this));
82+
globalAbortSignal?.addEventListener("abort", this.destroy.bind(this), {
83+
once: true,
84+
});
85+
8386
this.#resizeObserver = new ResizeObserver(
8487
([
8588
{

0 commit comments

Comments
 (0)