Explorar o código

Поправка бага

Book Pauk %!s(int64=6) %!d(string=hai) anos
pai
achega
110542ad24
Modificáronse 1 ficheiros con 11 adicións e 8 borrados
  1. 11 8
      client/components/Reader/Reader.vue

+ 11 - 8
client/components/Reader/Reader.vue

@@ -175,15 +175,18 @@ class Reader extends Vue {
     }
 
     mounted() {
-        if (this.$root.rootRoute == '/reader') {
-            if (this.routeParamUrl) {
-                this.loadBook({url: this.routeParamUrl, bookPos: this.routeParamPos});
-            } else if (this.mostRecentBook()) {
-                this.loadBook({url: this.this.mostRecentBook().url});
-            } else {
-                this.loaderActive = true;
+        (async() => {
+            await bookManager.init();
+            if (this.$root.rootRoute == '/reader') {
+                if (this.routeParamUrl) {
+                    this.loadBook({url: this.routeParamUrl, bookPos: this.routeParamPos});
+                } else if (this.mostRecentBook()) {
+                    this.loadBook({url: this.mostRecentBook().url});
+                } else {
+                    this.loaderActive = true;
+                }
             }
-        }
+        })();
     }
 
     get routeParamPos() {