fix: a crash related to accessing navbar values before setup
This commit is contained in:
parent
5ca4762f01
commit
3ac8595af6
2 changed files with 7 additions and 3 deletions
|
@ -14,6 +14,7 @@
|
||||||
class="context-icon"
|
class="context-icon"
|
||||||
:name="props.contextName" :seed="props.guildUuid"/>
|
:name="props.contextName" :seed="props.guildUuid"/>
|
||||||
<NuxtImg v-else
|
<NuxtImg v-else
|
||||||
|
class="context-icon"
|
||||||
:src="defaultIcon" />
|
:src="defaultIcon" />
|
||||||
|
|
||||||
<div class="context-title">
|
<div class="context-title">
|
||||||
|
|
|
@ -45,9 +45,12 @@ onActivated(async () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
function updateNavbar() {
|
function updateNavbar() {
|
||||||
|
if (navbar.value) {
|
||||||
navbar.value.channelItems = []
|
navbar.value.channelItems = []
|
||||||
navbar.value.contextName = "Direct Messages"
|
navbar.value.contextName = "Direct Messages"
|
||||||
navbar.value.contextIcon = undefined
|
navbar.value.contextIcon = undefined
|
||||||
|
navbar.value.guildUuid = undefined
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue