projects
/
ratchet
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1a51645
)
Always return the result of querySelector
author
Ben Schwarz
<ben@germanforblack.com>
Mon, 24 Dec 2012 01:45:23 +0000
(12:45 +1100)
committer
Ben Schwarz
<ben@germanforblack.com>
Mon, 24 Dec 2012 01:45:23 +0000
(12:45 +1100)
lib/js/modals.js
patch
|
blob
|
history
diff --git
a/lib/js/modals.js
b/lib/js/modals.js
index
debdc03
..
6a0e6ef
100644
(file)
--- a/
lib/js/modals.js
+++ b/
lib/js/modals.js
@@
-15,15
+15,10
@@
};
var getModal = function (event) {
- var modal;
var modalToggle = findModals(event.target);
-
if (!modalToggle || !modalToggle.hash) return;
-
- modal = document.querySelector(modalToggle.hash);
- if (!modal) return;
- return modal;
+ return document.querySelector(modalToggle.hash);
};
window.addEventListener('touchend', function (event) {