Merge pull request #175 from status-im/bugfix/close-content-when-no-file
Reset content if empty
This commit is contained in:
commit
1a60f0f718
|
@ -120,8 +120,8 @@ class TextEditor extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
componentDidUpdate(prevProps) {
|
||||||
if (this.props.currentFile.content && this.props.currentFile.content !== prevProps.currentFile.content) {
|
if (this.props.currentFile.content !== prevProps.currentFile.content) {
|
||||||
editor.setValue(this.props.currentFile.content);
|
editor.setValue(this.props.currentFile.content || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateMarkers();
|
this.updateMarkers();
|
||||||
|
|
Loading…
Reference in New Issue