mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-16 23:57:11 +00:00
Reset content if empty
This commit is contained in:
parent
eb8759083c
commit
d1170d3cef
@ -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…
x
Reference in New Issue
Block a user