Fix PortalGroup context

This commit is contained in:
Ryan Gossiaux
2021-12-14 16:01:47 -08:00
parent 7de1e35524
commit 47c6918fd2

View File

@@ -12,7 +12,9 @@
<script lang="ts">
export let target: HTMLElement | null;
setContext(PORTAL_GROUP_CONTEXT_NAME, writable(target));
let targetStore = writable(target);
setContext(PORTAL_GROUP_CONTEXT_NAME, targetStore);
$: targetStore.set(target);
</script>
<slot />