Skip to content

Commit 3d983fb

Browse files
committed
tweak
1 parent 7a3002c commit 3d983fb

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @import { ProxyMetadata, ProxyStateObject, Source } from '#client' */
22
import { DEV } from 'esm-env';
3-
import { get, component_context, active_effect, untrack } from './runtime.js';
3+
import { get, component_context, active_effect, untrack, active_reaction } from './runtime.js';
44
import {
55
array_prototype,
66
get_descriptor,
@@ -120,8 +120,8 @@ export function proxy(value, parent = null, prev) {
120120
if (
121121
is_proxied_array &&
122122
prop === Symbol.toPrimitive &&
123-
active_effect !== null &&
124-
(active_effect.f & TEMPLATE_EFFECT) !== 0
123+
active_reaction !== null &&
124+
(active_reaction.f & TEMPLATE_EFFECT) !== 0
125125
) {
126126
return (/** @type {'string' | 'number' | 'default'} */ hint) =>
127127
untrack(() => (hint === 'number' ? Number(target) : String(target)));

0 commit comments

Comments
 (0)