mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-27 21:26:38 +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() {
|
exports.listRemovable = function() {
|
||||||
return drivelist.listAsync().then(function(drives) {
|
return drivelist.listAsync().filter(function(drive) {
|
||||||
return drives.filter(function(drive) {
|
return !drive.system;
|
||||||
return !drive.system;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user