summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/post_view/components/post_attachment_opengraph.jsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/webapp/components/post_view/components/post_attachment_opengraph.jsx b/webapp/components/post_view/components/post_attachment_opengraph.jsx
index 20beaed51..b83150839 100644
--- a/webapp/components/post_view/components/post_attachment_opengraph.jsx
+++ b/webapp/components/post_view/components/post_attachment_opengraph.jsx
@@ -81,6 +81,10 @@ export default class PostAttachmentOpenGraph extends React.Component {
}
getBestImageUrl() {
+ if (this.state.data.images == null) {
+ return null;
+ }
+
const nearestPointData = CommonUtils.getNearestPoint(this.imageDimentions, this.state.data.images, 'width', 'height');
const bestImage = nearestPointData.nearestPoint;