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

--HG--
extra : rebase_source : 84e87676959008c4f884d171788682506ac11804
This commit is contained in:
Jeremy Lempereur 2018-01-29 21:52:54 +01:00
Родитель 239653c730
Коммит 4956f5e043
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;
});