From 0a2678b9177e1cb5645fe5f8390af8034cfd7789 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 29 Mar 2016 00:46:51 +0100 Subject: [PATCH] Add warning if fixupHeight fails, and remove overzealous logging --- src/components/views/messages/MImageBody.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/messages/MImageBody.js b/src/components/views/messages/MImageBody.js index 02ccfbd107..ff05cf8609 100644 --- a/src/components/views/messages/MImageBody.js +++ b/src/components/views/messages/MImageBody.js @@ -122,6 +122,7 @@ module.exports = React.createClass({ fixupHeight: function() { if (!this.refs.image) { + console.warn("Refusing to fix up height on MImageBody with no image element"); return; } @@ -135,7 +136,7 @@ module.exports = React.createClass({ //console.log("trying to fit image into timelineWidth of " + this.refs.body.offsetWidth + " or " + this.refs.body.clientWidth); if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, timelineWidth, maxHeight); this.refs.image.style.height = thumbHeight + "px"; - console.log("Imageheight now", thumbHeight); + // console.log("Image height now", thumbHeight); }, render: function() {