Skip to content

Commit

Permalink
Prevent method call on nil object
Browse files Browse the repository at this point in the history
  • Loading branch information
aliciapaz committed Apr 4, 2024
1 parent 61e9cce commit 2b5fd2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/javascript/controllers/modal_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ export default class extends Controller {
}

displayAppliedIcon() {
if (this.appliedIcon === null) { return }

if (this.modalCheckboxes.some((check) => check.checked === true)) {
this.appliedIcon.classList.remove("hidden");
this.appliedIcon.classList.add("inline-block");
Expand Down

0 comments on commit 2b5fd2c

Please sign in to comment.