Skip to content

Commit

Permalink
Properly cleanup timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugos68 committed Apr 30, 2024
1 parent 3a7a68c commit 6ca9f67
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/hooks/useHover/index.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ class Hover {
this.#floating = floating;
this.#options = options;

$effect(() => this.#clearTimeouts());
$effect(() => {
return () => {
this.#clearTimeouts();
};
});
}

get reference() {
Expand Down

0 comments on commit 6ca9f67

Please sign in to comment.