Skip to content

Commit

Permalink
fix(Forwarder): hide selectedConversationName if not available
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Feb 21, 2024
1 parent 56b25d4 commit 6695f5a
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<template>
<div class="forwarder">
<NcEmptyContent :description="t('spreed', 'The message has been forwarded to {selectedConversationName}')">
<NcEmptyContent :description="description">
<template #icon>
<Check :size="64" />
</template>
Expand Down Expand Up @@ -50,7 +50,7 @@
<NcModal v-else
:container="container"
@close="handleClose">
<NcEmptyContent :description="t('spreed', 'The message has been forwarded to {selectedConversationName}', { selectedConversationName })">
<NcEmptyContent :description="description">
<template #icon>
<Check :size="64" />
</template>
Expand Down Expand Up @@ -124,7 +124,15 @@ export default {
},

selectedConversationName() {
return this.$store.getters?.conversation(this.selectedConversationToken).displayName
return this.$store.getters?.conversation(this.selectedConversationToken)?.displayName
},

description() {
return this.selectedConversationName
? t('spreed', 'The message has been forwarded to {selectedConversationName}',
{ selectedConversationName: this.selectedConversationName },
)
: t('spreed', 'The message has been forwarded')
},

/**
Expand Down

0 comments on commit 6695f5a

Please sign in to comment.