Update:Prefer epub ebook file when setting ebook #1825, validate ebookLocation

This commit is contained in:
advplyr 2023-06-06 16:53:11 -05:00
parent 9547824aaa
commit fde07d26e5
4 changed files with 27 additions and 12 deletions

View file

@ -95,7 +95,9 @@ export default {
return this.$store.getters['user/getUserMediaProgress'](this.libraryItemId)
},
savedPage() {
return Number(this.userMediaProgress?.ebookLocation || 0)
// Validate ebookLocation is a number
if (!this.userMediaProgress?.ebookLocation || isNaN(this.userMediaProgress.ebookLocation)) return 0
return Number(this.userMediaProgress.ebookLocation)
},
pdfDocInitParams() {
return {