diff --git a/dist/ratchet.js b/dist/ratchet.js index 732bc5a..f7150bb 100644 --- a/dist/ratchet.js +++ b/dist/ratchet.js @@ -75,9 +75,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;