mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
Fix object vs. array initialization in template search
The "redirects" part in a prefixsearch query is always an array, no matter if formatversion 1 or 2 is used. The "pages" part is an object with formatversion 1, and an array with formatversion 2. As of now this always uses formatversion 1. This is hard-coded in the upstream TitleWidget class. Change-Id: I8cde8e104f8a288015da745db41016f6639b453b
This commit is contained in:
parent
4f0c564fbc
commit
b7043d6f24
|
@ -77,7 +77,7 @@ ve.ui.MWTemplateTitleInputWidget.prototype.getLookupRequest = function () {
|
|||
return promise
|
||||
.then( function ( response ) {
|
||||
var xhr, pageId, redirIndex,
|
||||
redirects = ( response.query && response.query.redirects ) || {},
|
||||
redirects = ( response.query && response.query.redirects ) || [],
|
||||
origPages = ( response.query && response.query.pages ) || {},
|
||||
newPages = [],
|
||||
titles = [];
|
||||
|
|
Loading…
Reference in a new issue