Skip to content

Commit

Permalink
Merge pull request #2 from irohalab/bugfix-download-card
Browse files Browse the repository at this point in the history
bugfix for download-card
  • Loading branch information
EverettSummer authored Jan 14, 2023
2 parents ce2d54e + d912d13 commit a84c254
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/admin/download-manager/download-manager.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class DownloadManagerService extends BaseService {
res.data.forEach(bgm => {
this.bangumiDict[bgm.id] = bgm;
});
return ids.map(id => this.bangumiDict[id]);
return ids.map(id => this.bangumiDict[id]).filter(bgm => !!bgm);
}));
} else {
return of(ids.filter(id => {
Expand Down
4 changes: 3 additions & 1 deletion src/app/pipes/readable-unit.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Pipe, PipeTransform } from '@angular/core';
import * as duration from 'dayjs/plugin/duration';
import duration from 'dayjs/plugin/duration';
import relativeTime from 'dayjs/plugin/relativeTime';
import dayjs from 'dayjs';

dayjs.extend(duration);
dayjs.extend(relativeTime);

const byteUnit = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const thresh = 1024;
Expand Down

0 comments on commit a84c254

Please sign in to comment.