fix: actually use the changes from #16617 (#16626)

* quick fix

* fix failing test
pull/16630/head
ComputerGuy 3 weeks ago committed by GitHub
parent a543559acf
commit 036d4588ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -26,7 +26,7 @@ export function inspect(get_value, inspector = console.log) {
return; return;
} }
var snap = snapshot(value, true); var snap = snapshot(value, true, true);
untrack(() => { untrack(() => {
inspector(initial ? 'init' : 'update', ...snap); inspector(initial ? 'init' : 'update', ...snap);
}); });

@ -1,21 +1,15 @@
<script> <script>
class A { class A {
toJSON(){ constructor() {
return { this.a = this;
a: this
}
} }
} }
const state = $state(new A()); const state = $state(new A());
$inspect(state); $inspect(state);
class B { class B {
toJSON(){ constructor() {
return { this.a = { b: this };
a: {
b: this
}
}
} }
} }
const state2 = $state(new B()); const state2 = $state(new B());

Loading…
Cancel
Save