1
0
Fork 0
mirror of synced 2024-07-01 04:21:06 +12:00

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}