Skip to content

Commit

Permalink
🐛 fix: Fix type in ChatMessage (fix #221)
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 20, 2024
1 parent 1e1532c commit d3fe658
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ChatList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const Item = memo<ChatListItemProps>((props) => {
if (!RenderFunction) return;
return <RenderFunction {...data} />;
},
[renderErrorMessages?.[item?.error?.type]],
[renderErrorMessages],
);

const Actions = useCallback(
Expand Down
2 changes: 1 addition & 1 deletion src/types/chatMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface ChatMessage extends BaseDataModel {
* @description 消息内容
*/
content: string;
error?: any;
error?: ChatMessageError;
// 扩展字段
extra?: any;

Expand Down

0 comments on commit d3fe658

Please sign in to comment.