about summary refs log tree commit diff
path: root/src/components/MediaPreview.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/MediaPreview.tsx')
-rw-r--r--src/components/MediaPreview.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/MediaPreview.tsx b/src/components/MediaPreview.tsx
index 6e368e7dc..208973cc9 100644
--- a/src/components/MediaPreview.tsx
+++ b/src/components/MediaPreview.tsx
@@ -54,6 +54,14 @@ export function Embed({
         <VideoItem thumbnail={e.view.thumbnail} alt={e.view.alt} />
       </Outer>
     )
+  } else if (
+    e.type === 'post_with_media' &&
+    // ignore further "nested" RecordWithMedia
+    e.media.type !== 'post_with_media' &&
+    // ignore any unknowns
+    e.media.view !== null
+  ) {
+    return <Embed embed={e.media.view} style={style} />
   }
 
   return null