diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index 8bae9b4c..21ede62a 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -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; }