mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-24 11:46:31 +00:00
Merge pull request #118 from resin-io/refactor/drivelist-bluebird
Use Bluebird's filter to simplify listRemovable()
This commit is contained in:
commit
73176ca203
@ -35,9 +35,7 @@ const drivelist = Bluebird.promisifyAll(require('drivelist'));
|
||||
* });
|
||||
*/
|
||||
exports.listRemovable = function() {
|
||||
return drivelist.listAsync().then(function(drives) {
|
||||
return drives.filter(function(drive) {
|
||||
return !drive.system;
|
||||
});
|
||||
return drivelist.listAsync().filter(function(drive) {
|
||||
return !drive.system;
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user