Skip to content

Commit bb6a9f1

Browse files
Simplify nodeVersion
1 parent 74b1448 commit bb6a9f1

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
66
## [1.4.4] 2024-11-27 - Maintenance update
77

88
- Remove useless assignment and unnecessary use of `undefined`
9+
- Simplify nodeVersion
910
- Update dependencies
1011
- Update URL in `.editorconfig`
1112
- Move Changelog from README.md to CHANGELOG.md

node_helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports = NodeHelper.create({
4949
`[CALEXT2] calendar:${calendar.name} >> Scanning start with interval:${calendar.scanInterval}`
5050
);
5151

52-
const nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/u)[1]);
52+
const nodeVersion = process.versions.node;
5353
const opts = {
5454
headers: {
5555
"User-Agent": `Mozilla/5.0 (Node.js ${nodeVersion}) MagicMirror/${global.version} (https://github.com/MagicMirrorOrg/MagicMirror/)`

0 commit comments

Comments
 (0)