Skip to content

Commit

Permalink
Update utility-list.js (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenhitchon authored May 10, 2024
1 parent 1533933 commit 900b5a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/utility-list/utility-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ class UtilityList extends Toggletip {
})

this.share.addEventListener('click', (event) => {
event.preventDefault()
const button = event.target.closest('a')
if (!button) return

event.preventDefault()

const social = button.getAttribute('data-social')
const url = this.getSocialUrl(button, social)
if (social === 'mail') {
Expand Down

0 comments on commit 900b5a6

Please sign in to comment.