fix: not return annotation author error happens (#1793)

This commit is contained in:
Joel 2023-12-19 17:22:54 +08:00 committed by GitHub
commit c3275dfd36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 10 deletions

View file

@ -114,7 +114,8 @@ const HeaderOptions: FC<Props> = ({
)
}
// !w-[208px]
className={'!w-[131px] h-fit !z-20'}
className={'!w-[135px] h-fit !z-20'}
popupClassName='!w-full'
manualClose
/>
{showAddModal && (

View file

@ -247,7 +247,7 @@ const Answer: FC<IAnswerProps> = ({
<Markdown className='line-through !text-gray-400' content={content} />
</div>
<EditTitle title={t('appAnnotation.editBy', {
author: annotation?.logAnnotation.account.name,
author: annotation?.logAnnotation.account?.name,
})} />
</div>
)}

View file

@ -100,7 +100,7 @@ const getFormattedChatList = (messages: ChatMessage[]) => {
if (item.annotation_hit_history) {
return {
id: item.annotation_hit_history.annotation_id,
authorName: item.annotation_hit_history.annotation_create_account.name,
authorName: item.annotation_hit_history.annotation_create_account?.name || 'N/A',
created_at: item.annotation_hit_history.created_at,
}
}