Skip to content

Commit b20a42d

Browse files
committed
small fix
1 parent 2d8764c commit b20a42d

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

app/src/components/Association/FavoriteAssociation.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ export const FavoriteAssociation = (props: FavoriteAssociationProps): JSX.Elemen
5353
props.association.getTargetMessage().then(setTarget)
5454
}, [props.association])
5555

56+
if (!target) {
57+
return <></>
58+
}
59+
5660
return (
5761
<ContentWithCCAvatar author={actionUser} linkTo={targetLink} profile={actionUserProfile}>
5862
<Box display="flex" justifyContent="space-between" alignItems="center">

app/src/components/Association/MentionAssociation.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export const MentionAssociation = (props: MentionAssociationProps): ReactElement
3434
props.association.getTargetMessage().then(setTarget)
3535
}, [props.association])
3636

37+
if (!target) {
38+
return <></>
39+
}
40+
3741
return (
3842
<ContentWithCCAvatar author={actionUser} linkTo={targetLink} profile={actionUserProfile}>
3943
<Box display="flex" justifyContent="space-between">

app/src/components/Association/ReactionAssociation.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ export const ReactionAssociation = (props: ReactionAssociationProps): JSX.Elemen
5353
props.association.getTargetMessage().then(setTarget)
5454
}, [props.association])
5555

56+
if (!target) {
57+
return <></>
58+
}
59+
5660
return (
5761
<ContentWithCCAvatar author={actionUser} linkTo={targetLink} profile={actionUserProfile}>
5862
<Box display="flex" justifyContent="space-between" alignItems="center">

0 commit comments

Comments
 (0)