Skip to content

Commit

Permalink
fix revalidate sort bug
Browse files Browse the repository at this point in the history
  • Loading branch information
UestcCarpediem authored Jan 31, 2024
1 parent 2ec6bd9 commit f10a271
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/core/service/BinarySyncerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ export class BinarySyncerService extends AbstractService {
existsItem.ignoreDownloadStatuses = item.ignoreDownloadStatuses;
existsItem.date = item.date;
} else if (dir.endsWith(latestVersionParent)) {
const isLatestItem = sortBy(fetchItems, [ 'date' ]).pop()?.name === item.name;
const isLatestItem = sortBy(fetchItems, item => {
return new Date(item.date);
}).pop()?.name === item.name;
if (isLatestItem && existsItem.isDir) {
diffItems.push({
item: existsItem,
Expand Down

0 comments on commit f10a271

Please sign in to comment.