🎨 Condensed condition

This commit is contained in:
Florian Sylvain
2022-01-07 18:10:40 +01:00
parent a2d42aaa61
commit 131a466b17
+1 -7
View File
@@ -72,13 +72,7 @@ function apiRequestThese(search, offset) {
.then(data => {
fetch(`api.php?q=count&search=${searchString}&option=${queryOption}&offset=0`)
.then(response => response.json())
.then(aCount => {
if (aCount.data) {
displayResults(data, aCount.data[0])
} else {
displayResults(data, 0)
}
})
.then(aCount => displayResults(data, aCount.data ? aCount.data[0] : 0))
})
} else {
alert('Veuillez attendre une seconde entre chaque recherche.')