[WebProfilerBundle] Fix time panel legend buttons

This commit is contained in:
Thomas Calvet 2019-09-13 18:20:59 +02:00
parent 4a866d066f
commit 7f4c8d3271

View File

@ -220,7 +220,9 @@ class Legend {
this.toggle = this.toggle.bind(this);
this.createCategory = this.createCategory.bind(this);
this.categories = Array.from(Object.keys(classnames)).map(this.createCategory);
this.categories = [];
Object.keys(classnames).forEach(this.createCategory);
}
add(category) {
@ -238,6 +240,8 @@ class Legend {
this.element.appendChild(element);
this.categories.push(element);
return element;
}