Skip to content

Commit

Permalink
Fix link event to reference currentTarget
Browse files Browse the repository at this point in the history
  • Loading branch information
stevej2608 committed Jan 6, 2025
1 parent 28d60a2 commit 9edbaba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reactpy_router/static/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ document.querySelector(".UUID").addEventListener(
// Prevent default if ctrl isn't pressed
if (!event.ctrlKey) {
event.preventDefault();
let to = event.target.getAttribute("href");
let to = event.currentTarget.getAttribute("href");
let new_url = new URL(to, window.location);

// Deduplication needed due to ReactPy rendering bug
Expand Down

0 comments on commit 9edbaba

Please sign in to comment.