File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -746,14 +746,16 @@ export function CommunityForum({
746746 onContextMenu = { ( e ) => e . preventDefault ( ) }
747747 > </ iframe >
748748 < div className = "absolute top-2 right-2 flex gap-2 opacity-0 group-hover:opacity-100 transition-opacity z-20" >
749- < a
750- href = { `/api/media/${ encodeURIComponent ( media . media ! . mediaId ) } ` }
751- onClick = { ( e ) => e . stopPropagation ( ) }
752- className = "rounded-md bg-black/60 text-white p-1.5 hover:bg-black/80"
753- aria-label = "Download"
754- >
755- < Download className = "h-4 w-4" />
756- </ a >
749+ { media . media ?. mediaId && (
750+ < a
751+ href = { `/api/media/${ encodeURIComponent ( media . media . mediaId ) } ` }
752+ onClick = { ( e ) => e . stopPropagation ( ) }
753+ className = "rounded-md bg-black/60 text-white p-1.5 hover:bg-black/80"
754+ aria-label = "Download"
755+ >
756+ < Download className = "h-4 w-4" />
757+ </ a >
758+ ) }
757759 < button
758760 type = "button"
759761 onClick = { ( e ) => {
You can’t perform that action at this time.
0 commit comments