Merge pull request #8702 from colinux/fix-ban-shortcut-noresult

fix(combo-address): provide a valid empty response
This commit is contained in:
Colin Darie 2023-02-28 09:00:21 +00:00 committed by GitHub
commit cc6ea04539
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,7 +75,12 @@ const defaultQueryFn: QueryFunction<unknown, QueryKey> = async ({
// BAN will error with queries less then 3 chars long
if (scope == 'adresse' && term.length < 3) {
return [];
return {
type: 'FeatureCollection',
version: 'draft',
features: [],
query: term
};
}
const url = buildURL(scope, term, extra);