commit | 1d6e57a0e314d709029cac52b98898b828f45a12 | [log] [tgz] |
---|---|---|
author | Tim van der Lippe <[email protected]> | Mon Sep 30 11:55:34 2019 |
committer | Commit Bot <[email protected]> | Mon Sep 30 11:55:34 2019 |
tree | 597a15659e3845a97779af856addeeb3fbb9f68e | |
parent | 9278806591e64473315401707afdba6a774a109d [diff] [blame] |
Always add braces to single-line if-statements The Chromium/Google style guides does not enforce curly braces for single-line if-statements, but does strongly recommend doing so. Adding braces will improve code readability, by visually separating code blocks. This will also prevent issues where accidental additions are pushed to the "else"-clause instead of in the if-block. This CL also updates the presubmit `eslint` to run the fix with the correct configuration. It will now fix all issues it can fix. Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526 Commit-Queue: Tim Van der Lippe <[email protected]> Reviewed-by: Yang Guo <[email protected]> Reviewed-by: Jeff Fisher <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#701070} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9
diff --git a/front_end/ui/Panel.js b/front_end/ui/Panel.js index 30f0ad3..5bcacc0 100644 --- a/front_end/ui/Panel.js +++ b/front_end/ui/Panel.js
@@ -71,10 +71,11 @@ */ showInfobar(infobar) { infobar.setCloseCallback(this._onInfobarClosed.bind(this, infobar)); - if (this.element.firstChild) + if (this.element.firstChild) { this.element.insertBefore(infobar.element, this.element.firstChild); - else + } else { this.element.appendChild(infobar.element); + } infobar.setParentView(this); this.doResize(); }