mirror of https://github.com/vector-im/riot-web
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.pull/21833/head
parent
11d039477d
commit
39323647d1
|
@ -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…
Reference in New Issue