Skip to content

Commit

Permalink
fix(search): 馃悰 exit early if there are no query results
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed Aug 3, 2023
1 parent 17593b8 commit 4241f85
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/skins.citizen.search/searchClients/mwActionApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4241f85

Please sign in to comment.