We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb51bff commit 2631a83Copy full SHA for 2631a83
packages/elements/src/prompt-input.tsx
@@ -360,11 +360,13 @@ export function PromptInputAttachments({
360
}: PromptInputAttachmentsProps) {
361
const attachments = usePromptInputAttachments();
362
363
- return attachments?.files.length > 0
364
- ? attachments?.files.map((file) => (
365
- <Fragment key={file.id}>{children(file)}</Fragment>
366
- ))
367
- : null;
+ if (!attachments.files.length) {
+ return null;
+ }
+
+ return attachments.files.map((file) => (
368
+ <Fragment key={file.id}>{children(file)}</Fragment>
369
+ ));
370
}
371
372
export type PromptInputActionAddAttachmentsProps = ComponentProps<
0 commit comments