Commit 735d1464 authored by Cecilia Ni's avatar Cecilia Ni Committed by Commit Bot

[App Management] Replace == to === in JavaScript.

This CL changes all the "==" in JavaScript to "===", to adhere the style guide.

Bug: 906508
Change-Id: I77961c553c71decb313560b5cadf89c28fda99c1
Reviewed-on: https://chromium-review.googlesource.com/c/1454111Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Reviewed-by: default avatarcalamity <calamity@chromium.org>
Commit-Queue: Cecilia Ni <ceciliani@google.com>
Cr-Commit-Position: refs/heads/master@{#629832}
parent 1182ec4c
...@@ -43,7 +43,7 @@ cr.define('app_management.actions', function() { ...@@ -43,7 +43,7 @@ cr.define('app_management.actions', function() {
* @param {string=} id * @param {string=} id
*/ */
function changePage(pageType, id) { function changePage(pageType, id) {
if (pageType == PageType.DETAIL && !id) { if (pageType === PageType.DETAIL && !id) {
console.warn( console.warn(
'Tried to load app detail page without providing an app id.'); 'Tried to load app detail page without providing an app id.');
} }
......
...@@ -141,7 +141,7 @@ Polymer({ ...@@ -141,7 +141,7 @@ Polymer({
.map(function(p) { .map(function(p) {
// Make the titles of app collapsible but make the number in the // Make the titles of app collapsible but make the number in the
// "X other app(s)" part non-collapsible. // "X other app(s)" part non-collapsible.
p.collapsible = !!p.arg && p.arg != '$' + placeholder; p.collapsible = !!p.arg && p.arg !== '$' + placeholder;
return p; return p;
}); });
return pieces; return pieces;
...@@ -158,7 +158,7 @@ Polymer({ ...@@ -158,7 +158,7 @@ Polymer({
const textContainer = this.$['notifications-sublabel']; const textContainer = this.$['notifications-sublabel'];
textContainer.textContent = ''; textContainer.textContent = '';
for (const p of pieces) { for (const p of pieces) {
if (!p.value || p.value.length == 0) { if (!p.value || p.value.length === 0) {
return; return;
} }
......
...@@ -76,12 +76,12 @@ cr.define('app_management', function() { ...@@ -76,12 +76,12 @@ cr.define('app_management', function() {
* @return {Page} * @return {Page}
*/ */
CurrentPageState.changePage = function(apps, action) { CurrentPageState.changePage = function(apps, action) {
if (action.pageType == PageType.DETAIL && apps[action.id]) { if (action.pageType === PageType.DETAIL && apps[action.id]) {
return { return {
pageType: PageType.DETAIL, pageType: PageType.DETAIL,
selectedAppId: action.id, selectedAppId: action.id,
}; };
} else if (action.pageType == PageType.NOTIFICATIONS) { } else if (action.pageType === PageType.NOTIFICATIONS) {
return { return {
pageType: PageType.NOTIFICATIONS, pageType: PageType.NOTIFICATIONS,
selectedAppId: null, selectedAppId: null,
...@@ -100,8 +100,8 @@ cr.define('app_management', function() { ...@@ -100,8 +100,8 @@ cr.define('app_management', function() {
* @return {Page} * @return {Page}
*/ */
CurrentPageState.removeApp = function(currentPage, action) { CurrentPageState.removeApp = function(currentPage, action) {
if (currentPage.pageType == PageType.DETAIL && if (currentPage.pageType === PageType.DETAIL &&
currentPage.selectedAppId == action.id) { currentPage.selectedAppId === action.id) {
return { return {
pageType: PageType.MAIN, pageType: PageType.MAIN,
selectedAppId: null, selectedAppId: null,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment