diff --git a/src/view/cli.js b/src/view/cli.js index d626a5c52..1ea11453b 100644 --- a/src/view/cli.js +++ b/src/view/cli.js @@ -90,13 +90,13 @@ class LogOutput extends Component { } get printLogs() { - this.tailLogs(); + this._tScroll = setTimeout(() => this.tailLogs(), 50); return this.props.logs; } tailLogs() { - const opt = { animated: false }; - this._tScroll = setTimeout(() => this._ref.current.scrollToEnd(opt), 50); + const view = this._ref && this._ref.current; + view && view.scrollToEnd({ animated: false }); } render() {