Skip to content

Commit

Permalink
Remove first devices array element after length check
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafostar committed Sep 14, 2019
1 parent 50494fc commit cff0a38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ module.exports = class Client
{
var devicesObject = {};
var outArray = outStr.split('device #');
outArray.shift();

if(outArray.length > 1)
{
outArray.shift();

outArray.forEach(device =>
{
var devName = device.substring(device.indexOf(':') + 2, device.indexOf('\n'));
Expand Down

0 comments on commit cff0a38

Please sign in to comment.