diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js index 33257703d..3214fe5d5 100644 --- a/public/react/src/modules/page/MainContentContainer.js +++ b/public/react/src/modules/page/MainContentContainer.js @@ -357,7 +357,9 @@ class MainContentContainer extends Component { this.fetchRepositoryCode(props, null, null, true) } else{ this.setState({ isEditablePath, currentPath: path }); - this.oldRepositoryCode = fetchRepositoryCodeResponse.data.content || ''; + this.oldRepositoryCode = ((fetchRepositoryCodeResponse.data.content === true || !fetchRepositoryCodeResponse.data.content) + ? '' : fetchRepositoryCodeResponse.data.content); + this.updateRepositoryCode(this.oldRepositoryCode, updateCodeMirror) }