Merge pull request #8702 from colinux/fix-ban-shortcut-noresult
fix(combo-address): provide a valid empty response
This commit is contained in:
commit
cc6ea04539
1 changed files with 6 additions and 1 deletions
|
@ -75,7 +75,12 @@ const defaultQueryFn: QueryFunction<unknown, QueryKey> = async ({
|
||||||
|
|
||||||
// BAN will error with queries less then 3 chars long
|
// BAN will error with queries less then 3 chars long
|
||||||
if (scope == 'adresse' && term.length < 3) {
|
if (scope == 'adresse' && term.length < 3) {
|
||||||
return [];
|
return {
|
||||||
|
type: 'FeatureCollection',
|
||||||
|
version: 'draft',
|
||||||
|
features: [],
|
||||||
|
query: term
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = buildURL(scope, term, extra);
|
const url = buildURL(scope, term, extra);
|
||||||
|
|
Loading…
Reference in a new issue