Detail the reason why we include the search term in the results

Co-Authored-By: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>
This commit is contained in:
Keirua 2020-01-27 16:47:32 +01:00 committed by GitHub
parent 9e858ae5ad
commit 455f164d02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,6 +127,8 @@ const adresseOptions = {
text: label,
geometry
}));
// Allow the user to select an arbitrary address missing from the results,
// by adding the plain-text query to the list of results.
r.unshift({ id: data.query, text: data.query });
return {
results: r