Fix hearts
[wolnelektury.git] / src / wolnelektury / static / js / book_text / progress.js
index d57a32f..723e03e 100644 (file)
@@ -1,8 +1,11 @@
 (function($){$(function(){
 
-    t = $('#global-progress').data('t');
+    let t = $('#global-progress').data('t');
+
     function upd_t() {
         $text = $('#main-text #book-text');
+        if (!$text.length) return;
+
         texttop = $text.offset().top;
 
         $footnotes = $('#footnotes', $text);