mirror of https://github.com/sveltejs/svelte
fix: visit expression node in directives (#10527)
* fix: visit child nodes in directives * test * cleanup * small change * lint * err * types * define the set locally, limit the blast radius --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/10528/head
parent
4d8d2928d8
commit
06e1d86091
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"svelte": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: visit expression node in directives
|
@ -1,9 +1,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
|
|
||||||
let action = writable((node) => {
|
let action = writable((node, text) => {
|
||||||
node.textContent = 'mounted';
|
node.textContent = text;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let text = writable('mounted')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div use:$action>hello</div>
|
<div use:$action={$text}>hello</div>
|
||||||
|
Loading…
Reference in new issue