mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +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;
|
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 ) {
|
||||||
|
|
Loading…
Reference in a new issue