Return empty in FireStats when not data

This commit is contained in:
vjrj 2018-05-02 11:15:03 +02:00
parent 4ca553ff92
commit 4d0911d529

View file

@ -11,8 +11,9 @@ class FireStats extends Component {
render() {
return (
<Fragment>
{ this.props.lastCheck && this.props.lastFireDetected &&
<Trans>Actualizado <FromNow when={this.props.lastCheck} />, último fuego detectado <FromNow when={this.props.lastFireDetected.when} />.</Trans>}
{ this.props.lastCheck && this.props.lastFireDetected ?
<Trans>Actualizado <FromNow when={this.props.lastCheck} />, último fuego detectado <FromNow when={this.props.lastFireDetected.when} />.</Trans>
: '' }
</Fragment>
);
}