8000 [WebProfiler] Fix Javascript error when using custom stopwatch catego… · symfony/symfony@e991472 · GitHub
[go: up one dir, main page]

Skip to content

Commit e991472

Browse files
curry684fabpot
authored andcommitted
[WebProfiler] Fix Javascript error when using custom stopwatch categories
1 parent b0989aa commit e991472

File tree

1 file changed

+2
-2
lines changed
  • src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,11 @@ class Legend {
252252
}
253253

254254
get(category) {
255-
return this.categories.find(element => element.value === category);
255+
return this.categories.find(element => element.value === category) || this.createCategory(category);
256256
}
257257

258258
getClassname(category) {
259-
return this.classnames[category];
259+
return this.classnames[category] || '';
260260
}
261261

262262
getSectionClassname() {

0 commit comments

Comments
 (0)
0