1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

fix file history (#4135)

This commit is contained in:
王健辉
2019-10-10 17:53:28 +08:00
committed by Daniel Pan
parent 6c49efe500
commit aa679fb3c2

View File

@@ -68,7 +68,10 @@ class FileHistory extends React.Component {
if (result.total_count < 5) {
if (result.data.length) {
let commitID = result.data[result.data.length-1].commit_id;
seafileAPI.listOldFileHistoryRecords(historyRepoID, filePath, commitID).then((res) => {
let path = result.data[result.data.length-1].path;
let oldPath = result.data[result.data.length-1].old_path;
path = oldPath ? oldPath : path;
seafileAPI.listOldFileHistoryRecords(historyRepoID, path, commitID).then((res) => {
if (!res.data) {
this.setState({isLoading: false});
throw Error('There is an error in server.');