mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 10:15:37 +03:00
Handle "unknown" media
On mastodon.social, images have type:image, but hachyderm returns type:unknown Found this when editing a post and add two images, on mastodon.social.
This commit is contained in:
parent
7762c5b6a7
commit
3ae82d6898
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,8 @@ function Media({ media, showOriginal, onClick }) {
|
|||
focalBackgroundPosition = `${x.toFixed(0)}% ${y.toFixed(0)}%`;
|
||||
}
|
||||
|
||||
if (type === 'image') {
|
||||
if (type === 'image' || (type === 'unknown' && previewUrl && url)) {
|
||||
// Note: type: unknown might not have width/height
|
||||
return (
|
||||
<div
|
||||
class={`media media-image`}
|
||||
|
|
Loading…
Reference in a new issue