Skip to content

Commit 036d458

Browse files
authored
fix: actually use the changes from #16617 (#16626)
* quick fix * fix failing test
1 parent a543559 commit 036d458

File tree

2 files changed

+5
-11
lines changed
  • packages/svelte

2 files changed

+5
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function inspect(get_value, inspector = console.log) {
2626
return;
2727
}
2828

29-
var snap = snapshot(value, true);
29+
var snap = snapshot(value, true, true);
3030
untrack(() => {
3131
inspector(initial ? 'init' : 'update', ...snap);
3232
});

packages/svelte/tests/runtime-runes/samples/inspect-recursive-2/main.svelte

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
<script>
22
class A {
3-
toJSON(){
4-
return {
5-
a: this
6-
}
3+
constructor() {
4+
this.a = this;
75
}
86
}
97
const state = $state(new A());
108
$inspect(state);
119
1210
class B {
13-
toJSON(){
14-
return {
15-
a: {
16-
b: this
17-
}
18-
}
11+
constructor() {
12+
this.a = { b: this };
1913
}
2014
}
2115
const state2 = $state(new B());

0 commit comments

Comments
 (0)