ソースを参照

Мелкий рефакторинг

Book Pauk 6 年 前
コミット
e595bea00d
1 ファイル変更5 行追加4 行削除
  1. 5 4
      client/components/Reader/HistoryPage/HistoryPage.vue

+ 5 - 4
client/components/Reader/HistoryPage/HistoryPage.vue

@@ -131,16 +131,17 @@ class HistoryPage extends Vue {
                 textLen = ` ${Math.round(book.textLength/1000)}k`;
                 textLen = ` ${Math.round(book.textLength/1000)}k`;
             }
             }
 
 
+            const fb2 = (book.fb2 ? book.fb2 : {});
             result.push({
             result.push({
                 touchDateTime: book.touchTime,
                 touchDateTime: book.touchTime,
                 touchDate: t[0],
                 touchDate: t[0],
                 touchTime: t[1],
                 touchTime: t[1],
                 desc: {
                 desc: {
-                    title: `"${book.fb2.bookTitle}"${perc}${textLen}`,
+                    title: `"${fb2.bookTitle}"${perc}${textLen}`,
                     author: _.compact([
                     author: _.compact([
-                        book.fb2.lastName,
-                        book.fb2.firstName,
-                        book.fb2.middleName
+                        fb2.lastName,
+                        fb2.firstName,
+                        fb2.middleName
                     ]).join(' '),
                     ]).join(' '),
                 },
                 },
                 url: book.url,
                 url: book.url,