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

Unified Diff: tracing/tracing/ui/analysis/generic_object_view.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase 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/analysis/generic_object_view.html
diff --git a/tracing/tracing/ui/analysis/generic_object_view.html b/tracing/tracing/ui/analysis/generic_object_view.html
index 3ba32e4eb884dc645bc9bb307ff358b9838795c3..9f68d5bcc51741cd68d5bfc233f87aa5beffcc6f 100644
--- a/tracing/tracing/ui/analysis/generic_object_view.html
+++ b/tracing/tracing/ui/analysis/generic_object_view.html
@@ -96,8 +96,9 @@ Polymer({
if (!(object instanceof Object)) {
var type = typeof object;
- if (type !== 'string')
+ if (type !== 'string') {
return this.appendSimpleText_(label, indent, object, suffix);
+ }
var objectReplaced = false;
if ((object[0] === '{' && object[object.length - 1] === '}') ||
(object[0] === '[' && object[object.length - 1] === ']')) {
@@ -203,14 +204,15 @@ Polymer({
var allStrings = true;
var allNumbers = true;
for (var i = 0; i < object.length; ++i) {
- if (typeof(object[i][colName]) !== 'string')
+ if (typeof(object[i][colName]) !== 'string') {
allStrings = false;
+ }
- if (typeof(object[i][colName]) !== 'number')
+ if (typeof(object[i][colName]) !== 'number') {
allNumbers = false;
+ }
- if (!allStrings && !allNumbers)
- break;
+ if (!allStrings && !allNumbers) break;
}
var column = {title: colName};
@@ -278,8 +280,9 @@ Polymer({
var indentSpan = document.createElement('span');
indentSpan.style.whiteSpace = 'pre';
- for (var i = 0; i < indent; i++)
+ for (var i = 0; i < indent; i++) {
Polymer.dom(indentSpan).textContent += ' ';
+ }
Polymer.dom(row).appendChild(indentSpan);
var labelSpan = document.createElement('span');

Powered by Google App Engine
This is Rietveld 408576698