fix bug where new files aren't editable
This commit is contained in:
parent
339b7d75db
commit
85bc40013c
1 changed files with 3 additions and 0 deletions
|
@ -97,6 +97,9 @@ class Editor extends React.Component {
|
|||
// then need to make CodeMirror documents
|
||||
this.initializeDocuments(nextProps.files);
|
||||
}
|
||||
if (this.props.files.length !== nextProps.files.length) {
|
||||
this.initializeDocuments(nextProps.files);
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
|
|
Loading…
Reference in a new issue