fixing posible null pointer excep

This commit is contained in:
kamidu 2017-03-23 14:12:12 +05:30
parent a85b5688a9
commit 3b9ae200e7
2 changed files with 15 additions and 15 deletions

View File

@ -194,7 +194,6 @@ deviceModule = function () {
}
if (device["deviceInfo"]) {
filteredDeviceData["latestDeviceInfo"] = device["deviceInfo"];
}
//location related verification and modifications
// adding the location histry for the movement path.
@ -212,6 +211,8 @@ deviceModule = function () {
filteredDeviceData.latestDeviceInfo.location.latitude = locationInfo.latitude;
}
}
}
response["content"] = filteredDeviceData;
response["status"] = "success";

View File

@ -98,7 +98,6 @@ function loadRoles() {
var dataFilter = function (data) {
data = JSON.parse(data);
console.log(data);
var objects = [];
var count = 0;
$(data.roles).each(function (index) {