Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions packages/svelte/src/internal/client/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ import { tracing_mode_flag } from '../flags/index.js';
* @returns {T}
*/
export function proxy(value, parent = null, prev) {
/** @type {Error | null} */
var stack = null;
if (DEV && tracing_mode_flag) {
stack = get_stack('CreatedAt');
}
// if non-proxyable, or is already a proxy, return `value`
if (typeof value !== 'object' || value === null || STATE_SYMBOL in value) {
return value;
Expand All @@ -46,6 +41,8 @@ export function proxy(value, parent = null, prev) {
var is_proxied_array = is_array(value);
var version = source(0);

var stack = DEV && tracing_mode_flag ? get_stack('CreatedAt') : null;

if (is_proxied_array) {
// We need to create the length source eagerly to ensure that
// mutations to the array are properly synced with our proxy
Expand Down