Commit 87040dc2 authored by Harrison Healey's avatar Harrison Healey Committed by Joram Wilander
Browse files

Fixed null pointer when calling onHeightReceived (#1288)

parent ac044db6
......@@ -42,7 +42,9 @@ export default class MarkdownImage extends React.PureComponent {
waitForHeight = () => {
if (this.refs.image.height) {
this.props.onHeightReceived(this.refs.image.height);
if (this.props.onHeightReceived) {
this.props.onHeightReceived(this.refs.image.height);
}
this.heightTimeout = 0;
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment