formatted the categories
This commit is contained in:
parent
d9707a25df
commit
1dfd2f765a
@ -173,10 +173,10 @@ function fetchCategories() {
|
|||||||
fetch(fetchURL)
|
fetch(fetchURL)
|
||||||
.then(resp => resp.json())
|
.then(resp => resp.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
console.log(data); // TODO remove
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
console.log(data[i]); // TODO remove
|
let category = data[i].toLowerCase();
|
||||||
document.getElementById("other-categories").appendChild(new Option(data[i]));
|
category = category.charAt(0).toUpperCase() + category.slice(1);
|
||||||
|
document.getElementById("other-categories").appendChild(new Option(category));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user