Update main.js

target -> currentTarget on links to stop mismatched matching