1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 09:51:26 +00:00
This commit is contained in:
Michael An
2019-04-18 11:03:25 +08:00
parent e13ae46134
commit bdeb5f31eb
2 changed files with 6 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ class CreateFile extends React.Component {
super(props); super(props);
this.state = { this.state = {
parentPath: '', parentPath: '',
childName: props.fileType, childName: props.fileType || '',
isDraft: false, isDraft: false,
errMessage: '', errMessage: '',
}; };

View File

@@ -249,9 +249,11 @@ class Draft extends React.Component {
} }
getDraftInfo = () => { getDraftInfo = () => {
seafileAPI.getFileInfo(draftRepoID, draftFilePath).then((res) => { if (draftStatus === 'open') {
this.setState({ draftInfo: res.data }); seafileAPI.getFileInfo(draftRepoID, draftFilePath).then((res) => {
}); this.setState({ draftInfo: res.data });
});
}
} }
getChangedNodes = () => { getChangedNodes = () => {