make sure that were actually handling a `.modal` element.
@ -20,6 +20,6 @@
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');
});
}();