Fixing error when properties is null

revert-70aa11f8
Rasika Perera 8 years ago
parent 12c8483b4b
commit 99fee36f2c

@ -254,10 +254,12 @@ deviceModule = function () {
var device = parse(backendResponse.responseText);
var propertiesList = device["properties"];
var properties = {};
if (propertiesList) {
for (var i = 0; i < propertiesList.length; i++) {
properties[propertiesList[i]["name"]] =
propertiesList[i]["value"];
}
}
var deviceObject = {};
deviceObject[constants["DEVICE_IDENTIFIER"]] = device["deviceIdentifier"];
deviceObject[constants["DEVICE_NAME"]] = device["name"];

Loading…
Cancel
Save