fix bug where new files aren't editable

This commit is contained in:
Cassie Tarakajian 2016-12-09 16:27:10 -05:00
parent 339b7d75db
commit 85bc40013c
1 changed files with 3 additions and 0 deletions

View File

@ -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) {