fix: calculate average time when no queue
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

pull/115/head 1.2.11-alpha.3
shancheas 2024-11-28 17:18:33 +07:00
parent 4a3e77043e
commit f661276c58
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ export class QueueTimeFormula {
});
const times = itemQueue.items.map((item) => item.play_estimation ?? 0);
const average = math.mean(times) * 60 * 1000; // change average minute to milliseconds
const average = times.length > 0 ? math.mean(times) * 60 * 1000 : 0; // change average minute to milliseconds
const calledQueue = await this.queueDataService.lastQueue(item_queue_id);