From 29efc96cd504af9f6f16ef52525c08fea6e87cf5 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Thu, 17 Sep 2020 09:52:10 -0700 Subject: [PATCH] Fixes: Error: Bad constructor arguments Change-Id: I2f1146946bfb96d50f9580f2f7a9bd5dcb926ef1 --- .../ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js index c845204995..3ce955bba1 100644 --- a/modules/ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js @@ -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';