mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
web: close shared service on window close
This commit is contained in:
@@ -75,6 +75,10 @@ export class SharedService<T extends object> extends EventTarget {
|
||||
{ signal: this.#onClose.signal }
|
||||
);
|
||||
|
||||
window.addEventListener("beforeunload", () => {
|
||||
this.close();
|
||||
});
|
||||
|
||||
this.proxy = this.#createProxy();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user