Merge pull request #12 from apache/uacheck
Missing UA is represented by "-"
Tested locally
diff --git a/static/plugins/downloads.js b/static/plugins/downloads.js
index f63a386..4531af3 100644
--- a/static/plugins/downloads.js
+++ b/static/plugins/downloads.js
@@ -30,7 +30,7 @@
if (key !== "Other" && keys_top.includes(key)) pie_array.push({name: key, value: dict[key]});
else others += dict[key];
}
- if (keys.length > limit) {
+ if (others > 0) { // were there any others?
pie_array.push({name: "Other", value: others});
}
return pie_array.sort((a,b) => b.value - a.value)