Skip to content

Commit 2f189ec

Browse files
committed
try this
1 parent e62c167 commit 2f189ec

File tree

1 file changed

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

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ import { tracing_mode_flag } from '../flags/index.js';
1919
* @template T
2020
* @param {T} value
2121
* @param {string} [path]
22+
* @param {boolean} [rename_path]
2223
* @returns {T}
2324
*/
24-
export function proxy(value, path) {
25+
export function proxy(value, path, rename_path = true) {
2526
// if `DEV`, change the proxy `path` since we don't know if its still "owned" by its original source
2627
if (
2728
DEV &&
29+
rename_path &&
2830
typeof value === 'object' &&
2931
value !== null &&
3032
STATE_SYMBOL in value &&
@@ -255,15 +257,15 @@ export function proxy(value, path) {
255257
s = DEV ? tag_source(s, to_trace_name(prop)) : s;
256258
set(
257259
s,
258-
with_parent(() => proxy(value, to_trace_name(prop)))
260+
with_parent(() => proxy(value, to_trace_name(prop), false))
259261
);
260262
sources.set(prop, s);
261263
}
262264
} else {
263265
has = s.v !== UNINITIALIZED;
264266
set(
265267
s,
266-
with_parent(() => proxy(value, to_trace_name(prop)))
268+
with_parent(() => proxy(value, to_trace_name(prop), false))
267269
);
268270
}
269271

0 commit comments

Comments
 (0)