Skip to content

Commit

Permalink
Fixing a typo in confirm.md (#2988)
Browse files Browse the repository at this point in the history
`evt` is not the correct variable name here - it should be `e`.
  • Loading branch information
zimventures authored Oct 31, 2024
1 parent 841df9b commit d39a598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/content/examples/confirm.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ which is then picked up by `hx-trigger`.
// The event is triggered on every trigger for a request, so we need to check if the element
// that triggered the request has a hx-confirm attribute, if not we can return early and let
// the default behavior happen
if (!evt.detail.target.hasAttribute('hx-confirm')) return
if (!e.detail.target.hasAttribute('hx-confirm')) return
// This will prevent the request from being issued to later manually issue it
e.preventDefault()
Expand Down

0 comments on commit d39a598

Please sign in to comment.