mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
modify res data judge
This commit is contained in:
@@ -45,8 +45,8 @@ class FileHistory extends React.Component {
|
|||||||
|
|
||||||
listNewHistoryRecords = (filePath, PER_PAGE) => {
|
listNewHistoryRecords = (filePath, PER_PAGE) => {
|
||||||
editUtilties.listFileHistoryRecords(filePath, 1, PER_PAGE).then(res => {
|
editUtilties.listFileHistoryRecords(filePath, 1, PER_PAGE).then(res => {
|
||||||
let historyList = res.data;
|
let historyData = res.data;
|
||||||
if (historyList.length === 0) {
|
if (!historyData) {
|
||||||
this.setState({isLoading: false});
|
this.setState({isLoading: false});
|
||||||
throw Error('there has an error in server');
|
throw Error('there has an error in server');
|
||||||
}
|
}
|
||||||
@@ -56,8 +56,8 @@ class FileHistory extends React.Component {
|
|||||||
|
|
||||||
listOldHistoryRecords = (repoID, filePath) => {
|
listOldHistoryRecords = (repoID, filePath) => {
|
||||||
seafileAPI.listOldFileHistoryRecords(repoID, filePath).then((res) => {
|
seafileAPI.listOldFileHistoryRecords(repoID, filePath).then((res) => {
|
||||||
let historyList = res.data;
|
let historyData = res.data;
|
||||||
if (historyList.length === 0) {
|
if (!historyData) {
|
||||||
this.setState({isLoading: false});
|
this.setState({isLoading: false});
|
||||||
throw Error('there has an error in server');
|
throw Error('there has an error in server');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user