Skip to content

Commit

Permalink
Merge pull request #650 from telefonicaid/task/remove_local_mergeDevi…
Browse files Browse the repository at this point in the history
…ceWithConfiguration

check device.active
  • Loading branch information
fgalan authored Oct 23, 2023
2 parents d66db8f + 113eb50 commit 165d290
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/commonBindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ let context = {
* @return {String} String identifier of the attribute type.
*/
function guessType(attribute, device) {
for (let i = 0; i < device.active.length; i++) {
if (device.active[i].name === attribute) {
return device.active[i].type;
if (device.active) {
for (let i = 0; i < device.active.length; i++) {
if (device.active[i].name === attribute) {
return device.active[i].type;
}
}
}

Expand Down

0 comments on commit 165d290

Please sign in to comment.