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() {
* @param {string=} id
*/
function changePage(pageType, id) {
if (pageType == PageType.DETAIL && !id) {
if (pageType === PageType.DETAIL && !id) {
console.warn(
'Tried to load app detail page without providing an app id.');
}
......
......@@ -141,7 +141,7 @@ Polymer({
.map(function(p) {
// Make the titles of app collapsible but make the number in the
// "X other app(s)" part non-collapsible.
p.collapsible = !!p.arg && p.arg != '$' + placeholder;
p.collapsible = !!p.arg && p.arg !== '$' + placeholder;
return p;
});
return pieces;
......@@ -158,7 +158,7 @@ Polymer({
const textContainer = this.$['notifications-sublabel'];
textContainer.textContent = '';
for (const p of pieces) {
if (!p.value || p.value.length == 0) {
if (!p.value || p.value.length === 0) {
return;
}
......
......@@ -76,12 +76,12 @@ cr.define('app_management', function() {
* @return {Page}
*/
CurrentPageState.changePage = function(apps, action) {
if (action.pageType == PageType.DETAIL && apps[action.id]) {
if (action.pageType === PageType.DETAIL && apps[action.id]) {
return {
pageType: PageType.DETAIL,
selectedAppId: action.id,
};
} else if (action.pageType == PageType.NOTIFICATIONS) {
} else if (action.pageType === PageType.NOTIFICATIONS) {
return {
pageType: PageType.NOTIFICATIONS,
selectedAppId: null,
......@@ -100,8 +100,8 @@ cr.define('app_management', function() {
* @return {Page}
*/
CurrentPageState.removeApp = function(currentPage, action) {
if (currentPage.pageType == PageType.DETAIL &&
currentPage.selectedAppId == action.id) {
if (currentPage.pageType === PageType.DETAIL &&
currentPage.selectedAppId === action.id) {
return {
pageType: PageType.MAIN,
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