parent
d4cdd1b790
commit
18239eb2e0
1 changed files with 4 additions and 2 deletions
|
@ -145,8 +145,10 @@ class PreviewFrame extends React.Component {
|
|||
|
||||
mergeLocalFilesAndEditorActiveFile() {
|
||||
const files = this.props.files.slice();
|
||||
const activeFileInEditor = this.props.cmController.getContent();
|
||||
files.find(file => file.id === activeFileInEditor.id).content = activeFileInEditor.content;
|
||||
if (this.props.cmController.getContent) {
|
||||
const activeFileInEditor = this.props.cmController.getContent();
|
||||
files.find(file => file.id === activeFileInEditor.id).content = activeFileInEditor.content;
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue