about summary refs log tree commit diff stats
path: root/src/reader.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader.ts')
-rw-r--r--src/reader.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/reader.ts b/src/reader.ts
index 705aab0..ac8c316 100644
--- a/src/reader.ts
+++ b/src/reader.ts
@@ -251,7 +251,7 @@ class ReaderClass extends AppCommon {
 
         console.log('trying to load book...');
 
-        let book_data = await localforage.getItem(this.cacheId("book"));
+        let book_data = await localforage.getItem(this.cacheId("book")) as Blob;
 
         if (!book_data) {
             console.log("local data not found, loading from network...");
@@ -332,7 +332,7 @@ class ReaderClass extends AppCommon {
 
         if (enable_hyphens) {
             /* global hyphenationPatternsEnUs, hyphenationPatternsRu, createHyphenator */
-(this.hyphenate as any).en = createHyphenator(hyphenationPatternsEnUs, { html: true });
+            (this.hyphenate as any).en = createHyphenator(hyphenationPatternsEnUs, { html: true });
             (this.hyphenate as any).ru = createHyphenator(hyphenationPatternsRu, { html: true });
         }
 
@@ -352,7 +352,7 @@ class ReaderClass extends AppCommon {
      * @param {ePub.Book} book
      */
     async showBookInfo(book: any) {
-        const bookinfo = await localforage.getItem(this.cacheId());
+        const bookinfo = await localforage.getItem(this.cacheId()) as BookInfo;
 
         let title;
         let author;
@@ -602,7 +602,7 @@ class ReaderClass extends AppCommon {
     initModals() {
         $('#settings-modal').on('shown.bs.modal', async () => {
 
-            const last_read = await localforage.getItem(this.cacheId("lastread"));
+            const last_read = await localforage.getItem(this.cacheId("lastread")) as LastRead;
 
             if (last_read && last_read.cfi) {
                 $(".lastread_input")
@@ -1596,7 +1596,7 @@ class ReaderClass extends AppCommon {
 
         let location_found = false;
 
-        const lr_local = (await localforage.getItem(this.cacheId("lastread"))) || {};
+        const lr_local = ((await localforage.getItem(this.cacheId("lastread"))) || {}) as LastRead;
         console.log('got local lastread', lr_local);
 
         if (this.isOnline()) {