Fix check for non-template-namespace transclusions

These are not just titles beginning with ':'

Change-Id: I9d7063c221561a0e582deb6944eaab6d9ab4e3f7
This commit is contained in:
Alex Monk 2016-07-25 20:04:04 +01:00
parent c075a17ff7
commit 8855ebf586

View file

@ -250,6 +250,7 @@
/** */
ve.dm.MWTransclusionModel.prototype.fetch = function () {
var i, len, item, title, queue,
templateNamespaceId = mw.config.get( 'wgNamespaceIds' ).template,
titles = [],
specs = {};
@ -271,7 +272,10 @@
// Skip titles that don't have a resolvable href
title &&
// Skip titles outside the template namespace
title.charAt( 0 ) !== ':' &&
mw.Title.newFromText(
title,
templateNamespaceId
).namespace === templateNamespaceId &&
// Skip already cached data
!hasOwn.call( specCache, title ) &&
// Skip duplicate titles in the same batch