Fix:Error adding new series if a series has a null title #3622

This commit is contained in:
advplyr 2024-11-18 07:59:02 -06:00
parent 778256ca16
commit a5e38d1473
3 changed files with 7 additions and 4 deletions

View file

@ -29,7 +29,12 @@ class BookMetadata {
this.subtitle = metadata.subtitle
this.authors = metadata.authors?.map ? metadata.authors.map((a) => ({ ...a })) : []
this.narrators = metadata.narrators ? [...metadata.narrators].filter((n) => n) : []
this.series = metadata.series?.map ? metadata.series.map((s) => ({ ...s })) : []
this.series = metadata.series?.map
? metadata.series.map((s) => ({
...s,
name: s.name || 'No Title'
}))
: []
this.genres = metadata.genres ? [...metadata.genres] : []
this.publishedYear = metadata.publishedYear || null
this.publishedDate = metadata.publishedDate || null