You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-14 19:02:33 +03:00
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:
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user