Skip to content

Commit

Permalink
fix(web): author of book can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
Xwite committed Oct 18, 2024
1 parent bb21d17 commit 4ffa729
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/web/src/views/BookChapter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ onMounted(async () => {
const chapterIndex = Number(sessionStorage.getItem('chapterIndex') || 0)
const chapterPos = Number(sessionStorage.getItem('chapterPos') || 0)
const isSeachBook = sessionStorage.getItem('isSeachBook') === 'true'
if (isNullOrBlank(bookUrl) || isNullOrBlank(name) || isNullOrBlank(author)) {
if (isNullOrBlank(bookUrl) || isNullOrBlank(name) || author === null) {
ElMessage.warning('书籍信息为空,即将自动返回书架页面...')
return setTimeout(toShelf, 500)
}
Expand Down Expand Up @@ -539,7 +539,7 @@ const addToBookShelfConfirm = async () => {
confirmButtonText: '确认',
cancelButtonText: '',
type: 'info',
/*
/*
ElMessageBox.confirm默认在触发hashChange事件时自动关闭
按下物理返回键时触发hashChange事件
使用router.push("/")则不会触发hashChange事件
Expand Down

0 comments on commit 4ffa729

Please sign in to comment.