Skip to content
Snippets Groups Projects
Verified Commit 9e785438 authored by TheJoeCoder's avatar TheJoeCoder
Browse files

Make sure no error if page number is not set

parent d3000f62
Branches
No related tags found
No related merge requests found
...@@ -651,9 +651,11 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -651,9 +651,11 @@ See https://github.com/adobe-type-tools/cmap-resources
PDFViewerApplication.eventBus.on("pagechanging", (e) => { PDFViewerApplication.eventBus.on("pagechanging", (e) => {
console.log('pagechanging, from ' + e.previous + ' to ' + e.pageNumber); console.log('pagechanging, from ' + e.previous + ' to ' + e.pageNumber);
{% if pagenumber %}
if (e.pageNumber === {{ pagenumber }}) { if (e.pageNumber === {{ pagenumber }}) {
return; return;
} }
{% endif %}
$.ajax( $.ajax(
"{% url 'update_progress' book_id=book.id %}", "{% url 'update_progress' book_id=book.id %}",
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment