mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-01 08:44:40 +02:00
prettier
This commit is contained in:
parent
812cb5a160
commit
a1d549a2b1
1 changed files with 6 additions and 3 deletions
|
@ -216,9 +216,12 @@ class FeedEpisode extends Model {
|
|||
*/
|
||||
static async createFromBooks(books, feed, slug, transaction) {
|
||||
// This is never null unless the books array is empty, as this method is not invoked when no books. Reduce needs an initial item
|
||||
const earliestLibraryItemCreatedAt = books.length > 0 ? books.reduce((earliest, book) => {
|
||||
return book.libraryItem.createdAt < earliest.libraryItem.createdAt ? book : earliest
|
||||
}).libraryItem.createdAt : null
|
||||
const earliestLibraryItemCreatedAt =
|
||||
books.length > 0
|
||||
? books.reduce((earliest, book) => {
|
||||
return book.libraryItem.createdAt < earliest.libraryItem.createdAt ? book : earliest
|
||||
}).libraryItem.createdAt
|
||||
: null
|
||||
|
||||
const feedEpisodeObjs = []
|
||||
let numExisting = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue