diff --git a/.changeset/unlucky-spies-flow.md b/.changeset/unlucky-spies-flow.md new file mode 100644 index 0000000000..991885e46f --- /dev/null +++ b/.changeset/unlucky-spies-flow.md @@ -0,0 +1,5 @@ +--- +"svelte": patch +--- + +fix: silence snapshot warnings inside `$inspect` diff --git a/packages/svelte/src/internal/client/dev/inspect.js b/packages/svelte/src/internal/client/dev/inspect.js index 733f6d834a..c5765cfc07 100644 --- a/packages/svelte/src/internal/client/dev/inspect.js +++ b/packages/svelte/src/internal/client/dev/inspect.js @@ -12,7 +12,7 @@ export function inspect(get_value, inspector = console.log) { let initial = true; inspect_effect(() => { - inspector(initial ? 'init' : 'update', ...snapshot(get_value())); + inspector(initial ? 'init' : 'update', ...snapshot(get_value(), true)); initial = false; }); }