Skip to content

Commit db9b0b5

Browse files
committed
fix
1 parent 2f189ec commit db9b0b5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +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]
22+
* @param {boolean} [preserve_path]
2323
* @returns {T}
2424
*/
25-
export function proxy(value, path, rename_path = true) {
25+
export function proxy(value, path, preserve_path = true) {
2626
// if `DEV`, change the proxy `path` since we don't know if its still "owned" by its original source
2727
if (
2828
DEV &&
29-
rename_path &&
29+
!preserve_path &&
3030
typeof value === 'object' &&
3131
value !== null &&
3232
STATE_SYMBOL in value &&

packages/svelte/src/internal/client/reactivity/sources.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export function set(source, value, should_proxy = false) {
139139
e.state_unsafe_mutation();
140140
}
141141

142-
let new_value = should_proxy ? proxy(value, DEV ? source.trace_name : undefined) : value;
142+
let new_value = should_proxy ? proxy(value, DEV ? source.trace_name : undefined, DEV ? false : undefined) : value;
143143

144144
return internal_set(source, new_value);
145145
}

0 commit comments

Comments
 (0)