diff --git a/app/containers/message/Audio.js b/app/containers/message/Audio.js index ecedd793..b23e9247 100644 --- a/app/containers/message/Audio.js +++ b/app/containers/message/Audio.js @@ -97,6 +97,11 @@ export default class Audio extends React.PureComponent { user, baseUrl, customEmojis, file } = this.props; const { description } = file; + + if (!baseUrl) { + return null; + } + return ( [ diff --git a/app/containers/message/Image.js b/app/containers/message/Image.js index d6ab72e7..ebdb1f0a 100644 --- a/app/containers/message/Image.js +++ b/app/containers/message/Image.js @@ -38,6 +38,11 @@ export default class extends React.PureComponent { render() { const { baseUrl, file, user } = this.props; const img = `${ baseUrl }${ file.image_url }?rc_uid=${ user.id }&rc_token=${ user.token }`; + + if (!baseUrl) { + return null; + } + return ( [ { return ( onPress(url.url)} style={[styles.button, index > 0 && styles.marginTop]}> - {/* - {url.image ? : null} - */} {url.image ? : null} {url.url} diff --git a/app/containers/message/Video.js b/app/containers/message/Video.js index 59be1c44..208382c2 100644 --- a/app/containers/message/Video.js +++ b/app/containers/message/Video.js @@ -62,6 +62,11 @@ export default class Video extends React.PureComponent { const { isVisible } = this.state; const { description } = this.props.file; const { baseUrl, user, customEmojis } = this.props; + + if (!baseUrl) { + return null; + } + return ( [