Skip to content

Commit 1183984

Browse files
authored
fix: addresses reactive Set bug in certain engines (#11120)
1 parent 0cf2e98 commit 1183984

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.changeset/young-masks-refuse.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: addresses reactive Set bug in certain engines

packages/svelte/src/reactivity/set.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ export class ReactiveSet extends Set {
4747
var proto = ReactiveSet.prototype;
4848
var set_proto = Set.prototype;
4949

50-
/** @type {string} */
51-
var method;
52-
53-
for (method of read_methods) {
50+
for (const method of read_methods) {
5451
// @ts-ignore
5552
proto[method] = function (...v) {
5653
get(this.#version);
@@ -59,7 +56,7 @@ export class ReactiveSet extends Set {
5956
};
6057
}
6158

62-
for (method of set_like_methods) {
59+
for (const method of set_like_methods) {
6360
// @ts-ignore
6461
proto[method] = function (...v) {
6562
get(this.#version);

0 commit comments

Comments
 (0)