Fix borked image when restore from draft

pull/252/head
Lim Chee Aun 2023-10-05 18:01:18 +08:00
rodzic aad855cafc
commit 4723358d2d
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -1477,7 +1477,8 @@ function MediaAttachment({
onRemove = () => {},
}) {
const supportsEdit = supports('@mastodon/edit-media-attributes');
const { url, type, id } = attachment;
const { type, id, file } = attachment;
const url = file ? URL.createObjectURL(file) : attachment.url;
console.log({ attachment });
const [description, setDescription] = useState(attachment.description);
const suffixType = type.split('/')[0];