Fix:Sort books for series #220

This commit is contained in:
advplyr 2021-12-06 16:18:26 -06:00
parent 04cbc49577
commit c17af1fc28

View File

@ -90,7 +90,13 @@ module.exports = {
}
}
})
return Object.values(_series)
return Object.values(_series).map((series) => {
series.books = sort(series.books).asc(ab => {
if (!isNaN(ab.book.volumeNumber) && ab.book.volumeNumber !== null) return Number(ab.book.volumeNumber)
return ab.book.volumeNumber
})
return series
})
},
getBooksWithUserAudiobook(user, books) {