Skip to content

Commit

Permalink
fix empty data error
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Sep 7, 2023
1 parent c93462b commit 048522e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pages/chase/binge/Binge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ const getBingeList = async () => {
const res = await star.pagination(pagination.value.pageIndex, pagination.value.pageSize);
res.list.map(async (item) => {
const { siteKey } = item;
const { name } = await sites.find({ key: siteKey });
item.siteName = name;
const res = await sites.find({ key: siteKey });
item.siteName = _.has(res, "name") ? res.name : '该源应该被删除了哦';
});
bingeList.value = _.unionWith(bingeList.value, res.list, _.isEqual);
pagination.value.count = res.total;
Expand Down
4 changes: 2 additions & 2 deletions src/pages/chase/history/History.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ const getHistoryList = async () => {
res.list.forEach(async (item) => {
const { date, siteKey } = item;
const { name } = await sites.find({ key: siteKey });
item.siteName = name;
const res = await sites.find({ key: siteKey });
item.siteName = _.has(res, "name") ? res.name : '该源应该被删除了哦';
console.log(item);
const timeDiff = filterDate(date);
let timeKey;
Expand Down

0 comments on commit 048522e

Please sign in to comment.