Don't show null URL previews

These are URLs that were spidered by the server without error but yielded an empty response from the server. There's nothing to display, so return an empty div.
This commit is contained in:
Luke Barnard 2017-05-08 14:01:44 +01:00
parent 11d039477d
commit 39323647d1

View file

@ -100,7 +100,9 @@ module.exports = React.createClass({
render: function() {
var p = this.state.preview;
if (!p) return <div/>;
if (!p || Object.keys(p).length === 0) {
return <div/>;
}
// FIXME: do we want to factor out all image displaying between this and MImageBody - especially for lightboxing?
var image = p["og:image"];