diff --git a/ui/src/components/UpLink.svelte b/ui/src/components/UpLink.svelte index 8df735b..b0de712 100644 --- a/ui/src/components/UpLink.svelte +++ b/ui/src/components/UpLink.svelte @@ -12,9 +12,10 @@ const location = useLocation(); let routerTo = "#"; - - if ($location.pathname.startsWith("/browse") && to.entity) { - routerTo = `${$location.pathname},${to.entity}`; + $: { + if ($location.pathname.startsWith("/browse") && to.entity) { + routerTo = `${$location.pathname},${to.entity}`; + } }