Show broken image for inline images without dimensions (#2868)

This commit is contained in:
Elias Nahum 2019-06-06 15:14:32 -04:00 committed by GitHub
parent cdfc1a8317
commit 2abf044193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,6 +114,11 @@ export default class MarkdownImage extends React.Component {
return;
}
if (!width || !height) {
this.setState({failed: true});
return;
}
this.setState({
failed: false,
originalHeight: height,