Skip to content

Commit 7f1f42e

Browse files
Fixed stats page not showing results
Code checked for the length property on an object, instead of on the object's keys.
1 parent 45b8c02 commit 7f1f42e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

backend/perf.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,7 @@ function get_stats(body, response) {
523523
var today_data = data[kind][i];
524524
counted.push(today_data);
525525

526-
var empty = today_data.by_crate.length == 0;
527-
if (!empty) {
526+
if (Object.keys(today_data.by_crate).length > 0) {
528527
last_idx = i;
529528
result.endDate = today_data.date;
530529
if (first_idx < 0) {

0 commit comments

Comments
 (0)