File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments