mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 15:27:17 +00:00
Use Bluebird's filter to simplify listRemovable()
This commit is contained in:
parent
9026e6ce2d
commit
1faa631f89
@ -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