Merge pull request #559 from msbg/Array-bugfix

Array iteration bugfix
This commit is contained in:
BWS Systems
2017-03-18 13:21:03 -05:00
committed by GitHub

View File

@@ -2347,7 +2347,7 @@ app.controller('DomoticzController', function ($scope, $location, $http, bridgeS
} }
else { else {
$scope.selectAll = true; $scope.selectAll = true;
for(var x = 0; x < bridgeService.state.haldevices.length; x++) { for(var x = 0; x < bridgeService.state.domoticzdevices.length; x++) {
if($scope.bulk.devices.indexOf(bridgeService.state.domoticzdevices[x]) < 0) if($scope.bulk.devices.indexOf(bridgeService.state.domoticzdevices[x]) < 0)
$scope.bulk.devices.push(bridgeService.state.domoticzdevices[x].devicename); $scope.bulk.devices.push(bridgeService.state.domoticzdevices[x].devicename);
} }
@@ -2469,7 +2469,7 @@ app.controller('LifxController', function ($scope, $location, $http, bridgeServi
} }
else { else {
$scope.selectAll = true; $scope.selectAll = true;
for(var x = 0; x < bridgeService.state.haldevices.length; x++) { for(var x = 0; x < bridgeService.state.lifxdevices.length; x++) {
if($scope.bulk.devices.indexOf(bridgeService.state.lifxdevices[x]) < 0) if($scope.bulk.devices.indexOf(bridgeService.state.lifxdevices[x]) < 0)
$scope.bulk.devices.push(bridgeService.state.lifxdevices[x].devicename); $scope.bulk.devices.push(bridgeService.state.lifxdevices[x].devicename);
} }