diff --git a/lib/js/modals.js b/lib/js/modals.js index 480c3af..242bada 100644 --- a/lib/js/modals.js +++ b/lib/js/modals.js @@ -21,8 +21,8 @@ window.addEventListener('touchend', function (event) { var modal = getModal(event); if (modal) { - modal.classList.toggle('active'); + if (modal && modal.classList.contains('modal')) modal.classList.toggle('active'); event.preventDefault(); // prevents rewriting url (apps can still use hash values in url) } }); -}(); \ No newline at end of file +}();