Update battery.js

This commit is contained in:
Simon Smith 2022-01-17 18:23:04 +00:00 committed by GitHub
parent 4069e8591f
commit 0e34d34aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,8 +244,8 @@ module.exports = function (callback) {
batteries[batteries.length - 1].push(parts[i]);
}
}
let designCapacities = data.results[1].split('\r\n');
let fullChargeCapacities = data.results[2].split('\r\n');
let designCapacities = data.results[1].split('\r\n').filter(e => e);
let fullChargeCapacities = data.results[2].split('\r\n').filter(e => e);
if (batteries.length) {
let first = false;
let additionalBatteries = [];