mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-28 04:12:41 +03:00
Fix borked image when restore from draft
This commit is contained in:
parent
aad855cafc
commit
4723358d2d
1 changed files with 2 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue