fix(webui): epub reader crash when reading one-shot from collection context

Closes: #1718
This commit is contained in:
Gauthier Roebroeck 2024-10-02 10:06:18 +08:00
parent fa006c0428
commit e7ef2bc91d

View file

@ -710,8 +710,10 @@ export default Vue.extend({
id: this.$route.query.contextId as string,
}
this.book.context = this.context
this.contextName = (await (this.$komgaReadLists.getOneReadList(this.context.id))).name
document.title = `Komga - ${this.contextName} - ${this.book.metadata.title}`
if (this?.context.origin === ContextOrigin.READLIST) {
this.contextName = (await (this.$komgaReadLists.getOneReadList(this.context.id))).name
document.title = `Komga - ${this.contextName} - ${this.book.metadata.title}`
}
} else {
document.title = `Komga - ${getBookTitleCompact(this.book.metadata.title, this.series.metadata.title)}`
}