服务端直接返回content true了

dev_hs
hjm 5 years ago
parent 0d0a2499a9
commit 6688b35d58

@ -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)
}

Loading…
Cancel
Save