Fix deleted comments crashing the discussions
Closes #753 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b196719238
commit
63d0703b95
|
@ -1,14 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<article class="comment">
|
<article class="comment">
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
<figure class="image is-48x48" v-if="comment.actor.avatar">
|
<figure
|
||||||
|
class="image is-48x48"
|
||||||
|
v-if="comment.actor && comment.actor.avatar"
|
||||||
|
>
|
||||||
<img class="is-rounded" :src="comment.actor.avatar.url" alt="" />
|
<img class="is-rounded" :src="comment.actor.avatar.url" alt="" />
|
||||||
</figure>
|
</figure>
|
||||||
<b-icon v-else size="is-large" icon="account-circle" />
|
<b-icon v-else size="is-large" icon="account-circle" />
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<span class="first-line name" v-if="!comment.deletedAt">
|
<span
|
||||||
|
class="first-line name"
|
||||||
|
v-if="comment.actor && !comment.deletedAt"
|
||||||
|
>
|
||||||
<strong>{{ comment.actor.name }}</strong>
|
<strong>{{ comment.actor.name }}</strong>
|
||||||
<small>@{{ usernameWithDomain(comment.actor) }}</small>
|
<small>@{{ usernameWithDomain(comment.actor) }}</small>
|
||||||
</span>
|
</span>
|
||||||
|
@ -17,7 +23,11 @@
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="icons"
|
class="icons"
|
||||||
v-if="!comment.deletedAt && comment.actor.id === currentActor.id"
|
v-if="
|
||||||
|
comment.actor &&
|
||||||
|
!comment.deletedAt &&
|
||||||
|
comment.actor.id === currentActor.id
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<b-dropdown aria-role="list">
|
<b-dropdown aria-role="list">
|
||||||
<b-icon slot="trigger" role="button" icon="dots-horizontal" />
|
<b-icon slot="trigger" role="button" icon="dots-horizontal" />
|
||||||
|
|
Loading…
Reference in a new issue