mirror of https://github.com/sveltejs/svelte
fix binding to module-level variables (#4352)
parent
83d461f537
commit
3cbe38cbf1
@ -0,0 +1,4 @@
|
||||
export default {
|
||||
skip_if_ssr: true,
|
||||
html: '<div>object</div>'
|
||||
};
|
@ -0,0 +1,11 @@
|
||||
<script context='module'>
|
||||
let foo;
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
let bar;
|
||||
onMount(() => bar = foo);
|
||||
</script>
|
||||
|
||||
<div bind:this={foo}>{typeof bar}</div>
|
Loading…
Reference in new issue