mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-10-13 17:27:16 +00:00
handle empty download hist stat
This commit is contained in:
parent
4016e81f9a
commit
8dba2e240e
@ -100,6 +100,12 @@ function downloadHist() {
|
||||
let apiEndpoint = '/api/stats/downloadhist/';
|
||||
let responseData = apiRequest(apiEndpoint, 'GET');
|
||||
let histBox = document.getElementById('downHistBox');
|
||||
if (responseData.length === 0) {
|
||||
let tile = buildTile('No recent downloads');
|
||||
histBox.appendChild(tile);
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < responseData.length; i++) {
|
||||
const dailyStat = responseData[i];
|
||||
let tile = buildDailyStat(dailyStat);
|
||||
|
Loading…
Reference in New Issue
Block a user