From 2cd885fbf9dfbb56c471b073f61e6191bba3dd33 Mon Sep 17 00:00:00 2001 From: Luc Claustres Date: Thu, 6 Jun 2024 08:28:27 +0200 Subject: [PATCH] fix: Location search component does not list geocoder results (closes #873) --- map/client/utils/utils.location.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/map/client/utils/utils.location.js b/map/client/utils/utils.location.js index 817080676..54b79c207 100644 --- a/map/client/utils/utils.location.js +++ b/map/client/utils/utils.location.js @@ -49,7 +49,8 @@ export async function queryGeocoder(planetConfig, path, query = '') { const jwt = await api.get('storage').getItem(planetConfig.gatewayJwt) let url = `${endpoint}/${path}` if (query) url += `?${query}` - const results = await fetch(url, { headers: { Authorization: `Bearer ${jwt}` } }).then((response) => response.json()) + const response = await fetch(url, { headers: { Authorization: `Bearer ${jwt}` } }) + const results = await response.json() return results }