mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-18 02:40:34 +00:00
Merge "Handle pages without ids in typeahead search"
This commit is contained in:
commit
0d957abf77
|
@ -37,11 +37,11 @@ function adaptApiResponse( config, query, restResponse, showDescription ) {
|
|||
const urlGeneratorInstance = urlGenerator( config );
|
||||
return {
|
||||
query,
|
||||
results: restResponse.pages.map( ( page ) => {
|
||||
results: restResponse.pages.map( ( page, index ) => {
|
||||
const thumbnail = page.thumbnail;
|
||||
return {
|
||||
id: page.id,
|
||||
value: page.id,
|
||||
value: page.id || -( index + 1 ),
|
||||
label: page.title,
|
||||
key: page.key,
|
||||
title: page.title,
|
||||
|
|
Loading…
Reference in a new issue