From 85bc40013ccbc0f38fa57da93f72d0187e3518fa Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Fri, 9 Dec 2016 16:27:10 -0500 Subject: [PATCH] fix bug where new files aren't editable --- client/modules/IDE/components/Editor.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 475b7014..422b13cd 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -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) {