mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-02 04:16:38 +08:00
Fix PostgreSQL migration resume and home crash guard
This commit is contained in:
@@ -60,9 +60,11 @@ function seriesTitleFromPath(path?: string): string {
|
||||
return normalizeTitle(parts[dirIndex])
|
||||
}
|
||||
|
||||
export function groupSeries(items: Media[]): SeriesCard[] {
|
||||
export function groupSeries(items: Media[] = []): SeriesCard[] {
|
||||
const safeItems = Array.isArray(items) ? items : []
|
||||
const groups = new Map<string, SeriesCard>()
|
||||
for (const m of items) {
|
||||
for (const m of safeItems) {
|
||||
if (!m) continue
|
||||
const key = getSeriesKey(m)
|
||||
|
||||
const g = groups.get(key)
|
||||
|
||||
Reference in New Issue
Block a user