X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f7d8acded4a58d423035c5759f6dee9a34396959..b89f3aa7efdc44a9b59b26384862df0f06803a7b:/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);