fixing posible null pointer excep

4.x.x
kamidu 8 years ago
parent a85b5688a9
commit 3b9ae200e7

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

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

Loading…
Cancel
Save