diff --git a/frontend/src/data/service/MangaUpdatesDataService.ts b/frontend/src/data/service/MangaUpdatesDataService.ts index 20ae4e4..d4b1505 100644 --- a/frontend/src/data/service/MangaUpdatesDataService.ts +++ b/frontend/src/data/service/MangaUpdatesDataService.ts @@ -137,7 +137,7 @@ export default class MangaUpdatesDataService { const chapter = parseInt(match[1]); return r.groups.map(g => ({series_id: s.series_id, group: g.name, chapter: chapter} as MangaUpdatesChapter)); }) - .flat(); + .flat() as MangaUpdatesChapter[]; //only keep chapter with the highest chapter number per group const filtered = Array.from(groupBy(updates, c => c.group).values()) diff --git a/frontend/src/util.ts b/frontend/src/util.ts index f5ab148..a78ab75 100644 --- a/frontend/src/util.ts +++ b/frontend/src/util.ts @@ -1,4 +1,4 @@ -export default function groupBy(arr: V[], fn: (v: V) => K): Map { +export default function groupBy(arr: V[], fn: (value: V) => K): Map { const map = new Map(); arr.forEach(e => { const key = fn(e);