Skip to content

Commit 3ee8fe1

Browse files
authored
tweak comment
1 parent fc00683 commit 3ee8fe1

File tree

1 file changed

+5
-5
lines changed
  • packages/svelte/src/internal/client

1 file changed

+5
-5
lines changed

packages/svelte/src/internal/client/proxy.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ export function proxy(value, parent = null, prev) {
134134

135135
// In case of something like `foo = bar.map(...)`, foo would have ownership
136136
// of the array itself, while the individual items would have ownership
137-
// of the component that created the proxy. That means if we later do
138-
// `foo[0].baz = 42`, we could get a false-positive ownership violation,
139-
// since the two proxies are not connected to each other via the parent
140-
// relationship. For this reason, we need to widen the ownership of the
141-
// children upon access when we detect they are not connected.
137+
// of the component that created bar. That means if we later do `foo[0].baz = 42`,
138+
// we could get a false-positive ownership violation, since the two proxies
139+
// are not connected to each other via the parent metadata relationship.
140+
// For this reason, we need to widen the ownership of the children
141+
// upon access when we detect they are not connected.
142142
if (DEV) {
143143
/** @type {ProxyMetadata | undefined} */
144144
var prop_metadata = v?.[STATE_SYMBOL_METADATA];

0 commit comments

Comments
 (0)