fix(media-library): stop loading non-image previews (#1947)

This commit is contained in:
Stefan Lau 2018-12-11 17:00:34 +01:00 committed by Shawn Erquhart
parent c3adebea06
commit 67585e84ae

View File

@ -46,7 +46,7 @@ const MediaLibraryCardGrid = ({
width={cardWidth}
margin={cardMargin}
isPrivate={isPrivate}
displayURL={getDisplayURL(file)}
displayURL={file.isViewableImage && getDisplayURL(file)}
/>
))}
{!canLoadMore ? null : <Waypoint onEnter={onLoadMore} />}