X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f7d8acded4a58d423035c5759f6dee9a34396959..f62cf7aef22c2c6797f5069d8d436a02977d89e9:/src/wolnelektury/static/js/book_text/progress.js?ds=sidebyside diff --git a/src/wolnelektury/static/js/book_text/progress.js b/src/wolnelektury/static/js/book_text/progress.js index ae5b14ac4..723e03ec9 100644 --- a/src/wolnelektury/static/js/book_text/progress.js +++ b/src/wolnelektury/static/js/book_text/progress.js @@ -4,6 +4,8 @@ function upd_t() { $text = $('#main-text #book-text'); + if (!$text.length) return; + texttop = $text.offset().top; $footnotes = $('#footnotes', $text);