1
0
Fork 0

Fix jslint

This commit is contained in:
Andreas Streichardt 2017-05-11 15:28:36 +02:00
parent 7211245627
commit 7f8ff26f41
1 changed files with 6 additions and 8 deletions

View File

@ -488,17 +488,17 @@ actions.defineHttp({
Health = Object.entries(Health).reduce((Health, [serverId,struct]) => {
let canBeDeleted = false;
if (struct.Role == 'Coordinator') {
canBeDeleted = struct.Status == 'FAILED';
} else if (struct.Role == 'DBServer') {
if (struct.Status == 'FAILED') {
if (struct.Role === 'Coordinator') {
canBeDeleted = struct.Status === 'FAILED';
} else if (struct.Role === 'DBServer') {
if (struct.Status === 'FAILED') {
let numUsed = reducePlanServers(function(numUsed, agencyKey, servers) {
if (servers.indexOf(serverId) !== -1) {
numUsed++;
}
return numUsed;
}, 0);
if (numUsed == false) {
if (numUsed === 0) {
numUsed = reduceCurrentServers(function(numUsed, agencyKey, servers) {
if (servers.indexOf(serverId) !== -1) {
numUsed++;
@ -506,9 +506,7 @@ actions.defineHttp({
return numUsed;
}, 0);
}
if (numUsed == 0) {
canBeDeleted = true;
}
canBeDeleted = numUsed === 0;
}
}
// the structure is all uppercase for whatever reason so make it uppercase as well