Actually perform interwiki check in MWLinkTargetInputWidget

Fixes my idiocy in I4b08f1c6

Bug: T72504
Change-Id: I1a7f14fc7f7169ac85eacd4e12a56acff1fe32ae
This commit is contained in:
Alex Monk 2015-01-19 22:49:38 +00:00
parent e2d953449b
commit f0f2912c9d

View file

@ -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