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

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