mirror of https://github.com/sveltejs/svelte
fix: handle member expressions in directives (#10576)
parent
802bfcabec
commit
d6e0fbd8ba
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: handle member expressions in directives
|
@ -1,11 +1,14 @@
|
||||
<script>
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
let action = writable((node, text) => {
|
||||
let store = writable({action: (node, text) => {
|
||||
node.textContent = text;
|
||||
});
|
||||
return {
|
||||
destroy() {}
|
||||
}
|
||||
}});
|
||||
|
||||
let text = writable('mounted')
|
||||
let text = writable('mounted');
|
||||
</script>
|
||||
|
||||
<div use:$action={$text}>hello</div>
|
||||
<div use:$store.action={$text}>hello</div>
|
||||
|
Loading…
Reference in new issue