Skip to content

Commit 69bae17

Browse files
committed
fix: defer call to has till needed
1 parent d2063ca commit 69bae17

File tree

1 file changed

+1
-2
lines changed
  • packages/svelte/src/reactivity

1 file changed

+1
-2
lines changed

packages/svelte/src/reactivity/set.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ export class ReactiveSet extends Set {
7272

7373
/** @param {T} value */
7474
has(value) {
75-
var exists = super.has(value);
7675
var s = this.#tracked.get(value);
7776

7877
if (s === undefined) {
79-
s = source(exists);
78+
s = source(super.has(value));
8079
this.#tracked.set(value, s);
8180
}
8281

0 commit comments

Comments
 (0)