Portal: make reactive correctly on changes to target from PortalGroup

This commit is contained in:
Ryan Gossiaux
2021-12-30 17:30:21 -10:00
parent 2911102eea
commit b0a3eef486

View File

@@ -4,7 +4,7 @@
import { portal } from "$lib/hooks/use-portal"; import { portal } from "$lib/hooks/use-portal";
let forceInRoot = usePortalRoot(); let forceInRoot = usePortalRoot();
let groupTarget = usePortalGroupContext(); let groupTarget = usePortalGroupContext();
let target = (() => { $: target = (() => {
// Group context is used, but still null // Group context is used, but still null
if ( if (
!(forceInRoot && $forceInRoot) && !(forceInRoot && $forceInRoot) &&