Fix:Server crash on matching book with an author name ending in comma #2796

This commit is contained in:
advplyr 2024-03-28 17:00:07 -05:00
parent f9b95bb003
commit 50bd2648aa
2 changed files with 10 additions and 1 deletions

View file

@ -508,7 +508,10 @@ export default {
} else if (key === 'author' && !this.isPodcast) {
var authors = this.selectedMatch[key]
if (!Array.isArray(authors)) {
authors = authors.split(',').map((au) => au.trim())
authors = authors
.split(',')
.map((au) => au.trim())
.filter((au) => !!au)
}
var authorPayload = []
authors.forEach((authorName) =>