Fix bug with tabs causing them to broadcast a change event on mount
This commit is contained in:
parent
1532fee301
commit
8befb1d545
|
@ -15,8 +15,12 @@
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
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
|
let top, left, width, height
|
||||||
$: calculateIndicatorLength($tab)
|
$: calculateIndicatorLength($tab)
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
$redirect("../")
|
$redirect("../")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$: console.log($page)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $auth.isAdmin}
|
{#if $auth.isAdmin}
|
||||||
|
|
Loading…
Reference in New Issue