[WebProfiler] Fix Javascript error when using custom stopwatch categories

This commit is contained in:
Niels Keurentjes 2019-04-07 13:47:03 +02:00 committed by Fabien Potencier
parent b0989aaffc
commit e991472a76

View File

@ -252,11 +252,11 @@ class Legend {
} }
get(category) { get(category) {
return this.categories.find(element => element.value === category); return this.categories.find(element => element.value === category) || this.createCategory(category);
} }
getClassname(category) { getClassname(category) {
return this.classnames[category]; return this.classnames[category] || '';
} }
getSectionClassname() { getSectionClassname() {