mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Actually perform interwiki check in MWLinkTargetInputWidget
Fixes my idiocy in I4b08f1c6 Bug: T72504 Change-Id: I1a7f14fc7f7169ac85eacd4e12a56acff1fe32ae
This commit is contained in:
parent
e2d953449b
commit
f0f2912c9d
|
@ -122,7 +122,10 @@ ve.ui.MWLinkTargetInputWidget.prototype.getLookupRequest = function () {
|
|||
if ( mw.Title.newFromText( this.value ) ) {
|
||||
return this.interwikiPrefixesPromise.then( function () {
|
||||
var interwiki = widget.value.substring( 0, widget.value.indexOf( ':' ) );
|
||||
if ( interwiki && interwiki !== '' ) {
|
||||
if (
|
||||
interwiki && interwiki !== '' &&
|
||||
widget.interwikiPrefixes.indexOf( interwiki ) !== -1
|
||||
) {
|
||||
return $.Deferred().resolve( { query: {
|
||||
pages: [{
|
||||
title: widget.value
|
||||
|
|
Loading…
Reference in a new issue