Skip to content

Commit

Permalink
Merge pull request #28 from KishoreIthadi/develop
Browse files Browse the repository at this point in the history
updated APIUtility
  • Loading branch information
KishoreIthadi authored Nov 16, 2019
2 parents 40bac6c + efe59ea commit 4c20ff3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions PingerExtension/src/scripts/APIutility.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,27 @@ var APIUtility = (function () {

data.forEach(function (item) {

var updatedObj = localStorageUtility.retriveItem(item.Key);
var updatedObj = localStorageUtility.retriveItem(item.key);
updatedObj.sendEmail = false;

if (item.PreviousState == config.taskStatus.checking &&
item.UpdatedState == config.taskStatus.dead) {
if (item.previousState == config.taskStatus.checking &&
item.updatedState == config.taskStatus.dead) {
// This condition executes when the entity is added for the first time and it fails
updatedObj.sendEmail = true;
} else if (item.PreviousState != config.taskStatus.checking &&
item.PreviousState != item.UpdatedState) {
} else if (item.previousState != config.taskStatus.checking &&
item.previousState != item.updatedState) {
updatedObj.sendEmail = true;
}

updatedObj.status = item.UpdatedState;
updatedObj.previousStatus = item.UpdatedState;
updatedObj.status = item.updatedState;
updatedObj.previousStatus = item.updatedState;

updatedObj.unableToRetrive = false;

localStorageUtility.updateItem(item.Key, updatedObj);
localStorageUtility.updateItem(item.key, updatedObj);

if (!isBackGroundTask) {
UIUtility.updateStatus(item.Key);
UIUtility.updateStatus(item.key);
}
});
},
Expand Down

0 comments on commit 4c20ff3

Please sign in to comment.