From aa679fb3c29a8f734a1523f348ceb8b6f6be54d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=81=A5=E8=BE=89?= Date: Thu, 10 Oct 2019 17:53:28 +0800 Subject: [PATCH] fix file history (#4135) --- frontend/src/file-history-old.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/file-history-old.js b/frontend/src/file-history-old.js index 4fd0155c08..757f2ef761 100644 --- a/frontend/src/file-history-old.js +++ b/frontend/src/file-history-old.js @@ -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.');