From 6688b35d58579975955abf9f97365646a31f9a47 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 22 Aug 2019 17:37:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E8=BF=94=E5=9B=9Econtent=20true=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/MainContentContainer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) }