Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: tracing/tracing/ui/extras/side_panel/alerts_side_panel.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: Fix test Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/ui/extras/side_panel/alerts_side_panel.html
diff --git a/tracing/tracing/ui/extras/side_panel/alerts_side_panel.html b/tracing/tracing/ui/extras/side_panel/alerts_side_panel.html
index 0988f6367cc9f4aa7178b276e3fffb4b57df2b9e..b6cd790b4612f617708b5be994ede0720cfd15c0 100644
--- a/tracing/tracing/ui/extras/side_panel/alerts_side_panel.html
+++ b/tracing/tracing/ui/extras/side_panel/alerts_side_panel.html
@@ -85,8 +85,9 @@ Polymer({
alertsByType_: function(alerts) {
var alertsByType = {};
alerts.forEach(function(alert) {
- if (!alertsByType[alert.title])
+ if (!alertsByType[alert.title]) {
alertsByType[alert.title] = [];
+ }
alertsByType[alert.title].push(alert);
});
@@ -126,8 +127,9 @@ Polymer({
table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
table.addEventListener('selection-changed', function(e) {
var row = table.selectedTableRow;
- if (row)
+ if (row) {
this.selectAlertsOfType(row.alertType);
+ }
}.bind(this));
return table;
@@ -135,8 +137,7 @@ Polymer({
updateContents_: function() {
Polymer.dom(this.$.result_area).textContent = '';
- if (this.model_ === undefined)
- return;
+ if (this.model_ === undefined) return;
var panel = this.createAlertsTable_(this.model_.alerts);
Polymer.dom(this.$.result_area).appendChild(panel);

Powered by Google App Engine
This is Rietveld 408576698