mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing error when properties is null
This commit is contained in:
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…
Reference in New Issue
Block a user