Browse Source

Implemented fix Added error handling to popover check. by chrismatthieu and fixed the resulting error Uncaught TypeError: Cannot call method 'contains' of undefined

pull/146/head
Artem Kholodenko 12 years ago
parent
commit
1ec5bb9929
  1. 13
      dist/ratchet.js

13
dist/ratchet.js vendored

@ -70,9 +70,16 @@
var anchor = findPopovers(e.target);
if (!anchor || !anchor.hash) return;
popover = document.querySelector(anchor.hash);
try{
popover = document.querySelector(anchor.hash);
}
catch (error) {
popover = null;
}
if (popover == null) return;
if (!popover || !popover.classList.contains('popover')) return;
return popover;

Loading…
Cancel
Save