[WebProfilerBundle] Fix time panel legend buttons
This commit is contained in:
parent
4a866d066f
commit
7f4c8d3271
@ -220,7 +220,9 @@ class Legend {
|
|||||||
this.toggle = this.toggle.bind(this);
|
this.toggle = this.toggle.bind(this);
|
||||||
this.createCategory = this.createCategory.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) {
|
add(category) {
|
||||||
@ -238,6 +240,8 @@ class Legend {
|
|||||||
|
|
||||||
this.element.appendChild(element);
|
this.element.appendChild(element);
|
||||||
|
|
||||||
|
this.categories.push(element);
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user