Merge "Fixes: Error: Bad constructor arguments"

This commit is contained in:
jenkins-bot 2020-09-18 16:52:11 +00:00 committed by Gerrit Code Review
commit 30e06502c1

View file

@ -619,7 +619,13 @@
// Add section is currently a wikitext-only feature
'#ca-addsection a'
).each( function () {
var linkUri = new mw.Uri( this.href );
var linkUri;
try {
linkUri = new mw.Uri( this.href );
} catch ( e ) {
// T66884
return;
}
if ( 'action' in linkUri.query ) {
delete linkUri.query.action;
linkUri.query.veaction = 'editsource';