Skip to content

Commit c636fc6

Browse files
authored
fix: silence snapshot warnings inside $inspect (#13334)
It's not really actionable and also confusing because the user doesn't see `$state.snapshot` anywhere in their code
1 parent e4926d7 commit c636fc6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/unlucky-spies-flow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: silence snapshot warnings inside `$inspect`

packages/svelte/src/internal/client/dev/inspect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function inspect(get_value, inspector = console.log) {
1212
let initial = true;
1313

1414
inspect_effect(() => {
15-
inspector(initial ? 'init' : 'update', ...snapshot(get_value()));
15+
inspector(initial ? 'init' : 'update', ...snapshot(get_value(), true));
1616
initial = false;
1717
});
1818
}

0 commit comments

Comments
 (0)