mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-14 10:04:56 +00:00
fix(search): 🐛 abort search request if there are no query
This commit is contained in:
parent
4ef5376cab
commit
88a5d4de9d
|
@ -64,6 +64,11 @@ async function getResults( searchQuery, controller ) {
|
|||
}
|
||||
}
|
||||
|
||||
/* Abort early if there are no search query */
|
||||
if ( searchQuery === '' ) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const signal = controller.signal;
|
||||
|
||||
const response = await fetch( gateway.getUrl( searchQuery ), { signal } );
|
||||
|
|
Loading…
Reference in a new issue