Merge pull request #211 from resin-io/fix/length-of-undefined

Fix Cannot read property 'length' of undefined
This commit is contained in:
Juan Cruz Viotti 2016-03-17 10:09:15 -04:00
commit dfcedffedd

View File

@ -100,7 +100,7 @@ driveScanner.service('DriveScannerService', function($q, $interval, $timeout) {
* }); * });
*/ */
this.scan = function() { this.scan = function() {
return $q.when(drives.listRemovable()).catch(dialog.showError); return $q.when(drives.listRemovable());
}; };
/** /**
@ -130,7 +130,7 @@ driveScanner.service('DriveScannerService', function($q, $interval, $timeout) {
return self.scan().then(function(drives) { return self.scan().then(function(drives) {
emitter.emit('scan', drives); emitter.emit('scan', drives);
self.setDrives(drives); self.setDrives(drives);
}); }).catch(dialog.showError);
}; };
// Make sure any pending interval is cancelled // Make sure any pending interval is cancelled