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:
parent
11d039477d
commit
39323647d1
1 changed files with 3 additions and 1 deletions
|
@ -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"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue