From 37d16db0f083005c8beb5c7d5b6dfd3e0bd25361 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 2 Oct 2019 12:46:21 -0600 Subject: [PATCH] Elsify --- src/components/views/messages/MImageBody.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/views/messages/MImageBody.js b/src/components/views/messages/MImageBody.js index 848cad6fb6..e89c6d2bc9 100644 --- a/src/components/views/messages/MImageBody.js +++ b/src/components/views/messages/MImageBody.js @@ -338,15 +338,17 @@ export default class MImageBody extends React.Component { // By doing this, the image "pops" into the timeline, but is still restricted // by the same width and height logic below. if (!this.state.loadedImageDimensions) { - let imageElement = ( - {content.body} - ); + let imageElement; if (!this.state.showImage) { imageElement = ; + } else { + imageElement = ( + {content.body} + ); } return this.wrapImage(contentUrl, imageElement); }