Skip to content

Commit fa8697d

Browse files
authored
fix: crash around audio attachment upload preview in draft mode (#3280)
* fix: crash around audio attachment upload preview in draft mode * fix: crash around audio attachment upload preview in draft mode
1 parent 77c7c95 commit fa8697d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package/src/components/MessageInput/components/AttachmentPreview/AudioAttachmentUploadPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const AudioAttachmentUploadPreview = ({
4141
const finalAttachment = useMemo(
4242
() => ({
4343
...attachment,
44-
asset_url: (attachment.localMetadata.file as FileReference).uri,
44+
asset_url: attachment.asset_url ?? (attachment.localMetadata.file as FileReference).uri,
4545
id: attachment.localMetadata.id,
4646
...audioAttachmentConfig,
4747
}),

0 commit comments

Comments
 (0)