mattermost-mobile-upstream/app/components/post_draft/uploads
Jesse Hallam 876af76f36
[MM-69129] Prevent crash on nameless attachment (#10091)
* [MM-69129] Prevent crash on nameless attachment.

A draft attachment persisted without a name or an extension made
`isImage` call `extractExtension(undefined)`, throwing on every render of
the channel and of the global Drafts screen. Guard against it so the
draft renders as a plain file card that the user can remove.

* [MM-69129] Exercise the upload item tests against the real file utils

Both suites stubbed `isImage` and `getFormattedFileSize`, which are pure
functions, so they asserted states the component can never see and could
not have caught this crash. Drop the mocks and let each fixture decide
which branch renders.
2026-08-24 12:10:59 -03:00
..
upload_item [MM-69129] Prevent crash on nameless attachment (#10091) 2026-08-24 12:10:59 -03:00
index.test.tsx MM-64415 Attachment style updated for draft and Edit post screen (#8961) 2025-07-07 16:24:27 +05:30
index.tsx [MM-66908] Fix error display for file upload in low bandwidth (#9418) 2026-03-25 12:44:36 -04:00