Bug 1432871 - about:telemetry - showing the Keyed Histograms category. r=chutten

The "Keyed Histograms" category didn't alway have the "has-data" class although there were some data to display. "option" was compared to a string but it's a dom element, so its value should be compared instead.

MozReview-Commit-ID: 3eC0UPpJaNJ
This commit is contained in:
Jeremy Lempereur
2018-01-29 21:52:54 +01:00
parent 9faa66a408
commit c3bd025e8e

View File

@@ -2253,10 +2253,10 @@ var KeyedHistogramSection = {
}
let hasData = Array.from(keyedHgramsSelect.options).some((option) => {
if (option == "parent") {
let value = option.getAttribute("value");
if (value == "parent") {
return Object.keys(aPayload.keyedHistograms).length > 0;
}
let value = option.getAttribute("value");
let keyedHistos = aPayload.processes[value].keyedHistograms;
return keyedHistos && Object.keys(keyedHistos).length > 0;
});