another optimization battery().ischarging for macOS

This commit is contained in:
Sebastian Hildebrandt 2018-04-05 22:46:53 +02:00
parent 8e599018fe
commit 306be41a01
2 changed files with 2 additions and 1 deletions

View File

@ -100,6 +100,7 @@ Other changes
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 3.37.11 | 2018-04-05 | another optimization `battery().ischarging` for macOS |
| 3.37.10 | 2018-04-05 | `battery().ischarging` optimized for macOS |
| 3.37.9 | 2018-04-03 | optimized `processes()`, bugfix `networkInterfaceDefault()` |
| 3.37.8 | 2018-03-25 | optimized `networkDefaultInterface()` detection, fixed network `operstate` MacOS |

View File

@ -117,7 +117,7 @@ module.exports = function (callback) {
}
}
if (parts && parts[1]) {
result.ischarging = parts[1].trim() !== 'discharging';
result.ischarging = parts[1].trim() !== 'charged';
} else {
result.ischarging = util.getValue(lines, 'ischarging', '=').toLowerCase() === 'yes';
}