refactor: change order for reading convenience
This commit is contained in:
parent
50897b6d35
commit
fccfd59ea3
@ -60,9 +60,10 @@
|
|||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
if (data && data.features) {
|
if (data && data.features) {
|
||||||
const locations = data.features.slice(0, 5); // Show only the first 5 results
|
|
||||||
resultsList.innerHTML = ''; // Clear previous results
|
resultsList.innerHTML = ''; // Clear previous results
|
||||||
|
|
||||||
|
const locations = data.features.slice(0, 5); // Show only the first 5 results
|
||||||
|
|
||||||
locations.forEach(location => {
|
locations.forEach(location => {
|
||||||
const listItem = document.createElement('li');
|
const listItem = document.createElement('li');
|
||||||
listItem.classList.add('result-item');
|
listItem.classList.add('result-item');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user