Permalink copying: fix another reference to e.target

Bug: T368701
Change-Id: Iae20e4573dfc12ea9d4010390fe2acb135e1b1cd
This commit is contained in:
David Lynch 2024-06-28 11:05:11 -05:00
parent 339a609c45
commit edb23dc849

View file

@ -6,7 +6,7 @@ function init( $pageContainer ) {
let link = e.currentTarget.href; let link = e.currentTarget.href;
try { try {
// decodeURI() may throw // decodeURI() may throw
const decodedLink = decodeURI( e.target.href ); const decodedLink = decodeURI( link );
// Check that the decoded URL is parsed to the same canonical URL // Check that the decoded URL is parsed to the same canonical URL
// new URL() may throw // new URL() may throw
if ( new URL( decodedLink ).toString() === link ) { if ( new URL( decodedLink ).toString() === link ) {