mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Fix check for non-template-namespace transclusions
These are not just titles beginning with ':' Change-Id: I9d7063c221561a0e582deb6944eaab6d9ab4e3f7
This commit is contained in:
parent
c075a17ff7
commit
8855ebf586
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue