Explorar o código

Добавил проверку __p при выходе за пределы текста

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

+ 5 - 0
client/components/Reader/TextPage/TextPage.vue

@@ -230,6 +230,11 @@ class TextPage extends Vue {
     }
     
     draw(immediate) {
+        if (this.book && this.bookPos >= this.parsed.textLength) {
+            this.doEnd();
+            return;
+        }
+
         this.canvasShowFirst = !this.canvasShowFirst;
         const context = this.context;