mirror of https://github.com/sveltejs/svelte
fix: take private and public into account for `constant_assignment` of derived state (#15276)
Fixes #15273pull/15271/head
parent
18481386f3
commit
5e52825d60
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: take private and public into account for `constant_assignment` of derived state
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1,13 @@
|
|||||||
|
<script>
|
||||||
|
class Test {
|
||||||
|
#deps = () => [];
|
||||||
|
|
||||||
|
deps = $derived.by(() => {
|
||||||
|
return [];
|
||||||
|
});
|
||||||
|
|
||||||
|
constructor(f = () => []) {
|
||||||
|
this.#deps = f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in new issue