1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-16 16:21:48 +00:00

fix file history page bug

This commit is contained in:
王健辉 2019-04-26 14:35:30 +08:00
parent d9345e1c8b
commit 7bd80c7a0c

View File

@ -122,12 +122,12 @@ class FileHistory extends React.Component {
this.setState({isReloadingData: true});
if (oldFilePath) {
seafileAPI.listOldFileHistoryRecords(historyRepoID, oldFilePath, commitID).then((res) => {
this.updateOldRecords(res.data);
this.updateOldRecords(res.data, oldFilePath);
this.setState({isReloadingData: false});
});
} else {
seafileAPI.listOldFileHistoryRecords(historyRepoID, filePath, commitID).then((res) => {
this.updateOldRecords(res.data);
this.updateOldRecords(res.data, filePath);
this.setState({isReloadingData: false});
});
}
@ -144,7 +144,7 @@ class FileHistory extends React.Component {
});
}
updateOldRecords(result) {
updateOldRecords(result, filePath) {
if (result.data.length) {
this.setState({
historyList: [...this.state.historyList, ...result.data],
@ -157,7 +157,7 @@ class FileHistory extends React.Component {
this.setState({nextCommit: result.next_start_commit,});
if (this.state.nextCommit) {
seafileAPI.listOldFileHistoryRecords(historyRepoID, filePath, this.state.nextCommit).then((res) => {
this.updateOldRecords(res.data);
this.updateOldRecords(res.data, filePath);
});
}
}