fixes #1061, sets selected file if it gets unset (#1066)

This commit is contained in:
Cassie Tarakajian 2019-05-06 14:50:28 -04:00 committed by GitHub
parent df1219b47a
commit d4cdd1b790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -600,7 +600,8 @@ function mapStateToProps(state) {
return {
files: state.files,
selectedFile: state.files.find(file => file.isSelectedFile) ||
state.files.find(file => file.name === 'sketch.js'),
state.files.find(file => file.name === 'sketch.js') ||
state.files.find(file => file.name !== 'root'),
htmlFile: getHTMLFile(state.files),
ide: state.ide,
preferences: state.preferences,