Merge pull request #63 from sgvictorino/fix-annotation-exception
fix: don't error when clicks dispatch on annotation link child
This commit is contained in:
commit
492a56605a
@ -26,7 +26,7 @@ window.addEventListener("load", () => {
|
|||||||
function getAnnotation(e) {
|
function getAnnotation(e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
//document.querySelector('.annotation')?.remove()
|
//document.querySelector('.annotation')?.remove()
|
||||||
const link = e.target.parentElement
|
const link = e.currentTarget
|
||||||
const uri = link.getAttribute("href")
|
const uri = link.getAttribute("href")
|
||||||
const presentAnnotation = link.nextElementSibling.matches(".annotation") && link.nextElementSibling
|
const presentAnnotation = link.nextElementSibling.matches(".annotation") && link.nextElementSibling
|
||||||
if (presentAnnotation) {
|
if (presentAnnotation) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user