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
|
@ -54,7 +54,8 @@ function Media({ media, showOriginal, onClick }) {
|
||||||
focalBackgroundPosition = `${x.toFixed(0)}% ${y.toFixed(0)}%`;
|
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 (
|
return (
|
||||||
<div
|
<div
|
||||||
class={`media media-image`}
|
class={`media media-image`}
|
||||||
|
|
Loading…
Reference in a new issue