mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-23 16:06:53 +00:00
Permalink copying: fix another reference to e.target
Bug: T368701 Change-Id: Iae20e4573dfc12ea9d4010390fe2acb135e1b1cd
This commit is contained in:
parent
339a609c45
commit
edb23dc849
|
@ -6,7 +6,7 @@ function init( $pageContainer ) {
|
|||
let link = e.currentTarget.href;
|
||||
try {
|
||||
// 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
|
||||
// new URL() may throw
|
||||
if ( new URL( decodedLink ).toString() === link ) {
|
||||
|
|
Loading…
Reference in a new issue