diff --git a/bookwyrm/static/js/status_cache.js b/bookwyrm/static/js/status_cache.js index b3e345b1..2a50bfcb 100644 --- a/bookwyrm/static/js/status_cache.js +++ b/bookwyrm/static/js/status_cache.js @@ -141,8 +141,10 @@ let StatusCache = new class { modal.getElementsByClassName("modal-close")[0].click(); // Update shelve buttons - document.querySelectorAll("[data-shelve-button-book='" + form.book.value +"']") - .forEach(button => this.cycleShelveButtons(button, form.reading_status.value)); + if (form.reading_status) { + document.querySelectorAll("[data-shelve-button-book='" + form.book.value +"']") + .forEach(button => this.cycleShelveButtons(button, form.reading_status.value)); + } return; } diff --git a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html index b041b70a..96e4da9b 100644 --- a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html +++ b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html @@ -11,6 +11,7 @@ Finish "{{ book_title }}" {% block modal-form-open %}