mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-22 18:26:12 +01:00
refactor: improve typing of Text part
This commit is contained in:
parent
a1cd9983e8
commit
89eeb71373
2 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ const Part = memo(({ part, isSubmitting, showCursor, messageId, isCreatedByUser
|
|||
if (part.type === ContentTypes.ERROR) {
|
||||
return <ErrorMessage text={part[ContentTypes.TEXT].value} className="my-2" />;
|
||||
} else if (part.type === ContentTypes.TEXT) {
|
||||
const text = typeof part.text === 'string' ? part.text : (part.text as { value: string }).value;
|
||||
const text = typeof part.text === 'string' ? part.text : part.text.value;
|
||||
|
||||
if (typeof text !== 'string') {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue