mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-15 18:40:05 +00:00
fix(search): 🐛 exit early if there are no query results
This commit is contained in:
parent
17593b8202
commit
4241f8522d
|
@ -60,6 +60,11 @@ function adaptApiResponse( config, query, response, showDescription ) {
|
|||
}
|
||||
};
|
||||
|
||||
// Early exit with there are no query
|
||||
if ( !response.query ) {
|
||||
return { query, results: {} };
|
||||
}
|
||||
|
||||
response = response.query;
|
||||
|
||||
// Merge redirects array into pages array if avaliable
|
||||
|
|
Loading…
Reference in a new issue