mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Merge "Fixes: Error: Bad constructor arguments"
This commit is contained in:
commit
30e06502c1
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue