code cleanup
This commit is contained in:
+1
-1
@@ -199,7 +199,7 @@ function audio(callback) {
|
||||
const parts = stdout.toString().split(/\n\s*\n/);
|
||||
for (let i = 0; i < parts.length; i++) {
|
||||
if (util.getValue(parts[i].split('\n'), 'name', '=')) {
|
||||
result.push(parseWindowsAudio(parts[i].split('\n'), i));
|
||||
result.push(parseWindowsAudio(parts[i].split('\n')));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -163,7 +163,7 @@ function bluetoothDevices(callback) {
|
||||
const parts = stdout.toString().split(/\n\s*\n/);
|
||||
for (let i = 0; i < parts.length; i++) {
|
||||
if (util.getValue(parts[i].split('\n'), 'PNPClass', '=') === 'Bluetooth') {
|
||||
result.push(parseWindowsBluetooth(parts[i].split('\n'), i));
|
||||
result.push(parseWindowsBluetooth(parts[i].split('\n')));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -468,7 +468,7 @@ function parseLinesDarwinNics(sections) {
|
||||
if (nic.speed === null) {
|
||||
speed = util.getValue(section, 'uplink rate');
|
||||
nic.speed = speed ? parseFloat(speed) : null;
|
||||
if (nic.speed > null && speed.toLowerCase().indexOf('gbps') >= 0) {
|
||||
if (nic.speed !== null && speed.toLowerCase().indexOf('gbps') >= 0) {
|
||||
nic.speed = nic.speed * 1000;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user