closest can returns itself as well

This commit is contained in:
taehoon 2019-07-23 20:59:37 -04:00
parent 17ad5bbdf9
commit 1cefaa8446

View file

@ -322,8 +322,7 @@ const Status = {
this.error = undefined
},
linkClicked (event) {
let { target } = event
target = target.tagName === 'A' ? target : target.closest('.status-content a')
const target = event.target.closest('.status-content a')
if (target) {
if (target.className.match(/mention/)) {
const href = target.href