Fix bug with tabs causing them to broadcast a change event on mount

This commit is contained in:
Andrew Kingston 2021-07-06 15:53:52 +01:00
parent 1532fee301
commit 8befb1d545
2 changed files with 6 additions and 4 deletions

View File

@ -15,8 +15,12 @@
const dispatch = createEventDispatcher()
$: selected = $tab.title
$: selected = dispatch("select", selected)
$: {
if ($tab.title !== selected) {
selected = $tab.title
dispatch("select", selected)
}
}
let top, left, width, height
$: calculateIndicatorLength($tab)

View File

@ -9,8 +9,6 @@
$redirect("../")
}
}
$: console.log($page)
</script>
{#if $auth.isAdmin}