From 110542ad244f118a7ff086460eb17aa2bdb2c9cb Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 3 Feb 2019 20:37:46 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=B1=D0=B0=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/Reader.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue index 32f5c3bf..5069c2df 100644 --- a/client/components/Reader/Reader.vue +++ b/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() {