Browse Source

Always return the result of querySelector

pull/135/head
Ben Schwarz 12 years ago
parent
commit
c8ed7e861d
  1. 7
      lib/js/modals.js

7
lib/js/modals.js

@ -15,15 +15,10 @@
}; };
var getModal = function (event) { var getModal = function (event) {
var modal;
var modalToggle = findModals(event.target); var modalToggle = findModals(event.target);
if (!modalToggle || !modalToggle.hash) return; if (!modalToggle || !modalToggle.hash) return;
modal = document.querySelector(modalToggle.hash);
if (!modal) return; return document.querySelector(modalToggle.hash);
return modal;
}; };
window.addEventListener('touchend', function (event) { window.addEventListener('touchend', function (event) {

Loading…
Cancel
Save