Skip to content

Commit a0e0d53

Browse files
Get rid of 'cb'
1 parent 1924a9d commit a0e0d53

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](https://semver.org/).
55

6-
## [1.4.4] 2024-11-27 - Maintenance update
6+
## [1.4.4] 2024-11-27
77

8+
- Get rid of callback function `cb`
89
- Remove useless assignment and unnecessary use of `undefined`
910
- Simplify nodeVersion
1011
- Optimize logging

node_helper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = NodeHelper.create({
4242
}
4343
},
4444

45-
async scanCalendar(calendar, cb) {
45+
async scanCalendar(calendar) {
4646
let response;
4747
let data;
4848
Log.log(
@@ -96,12 +96,12 @@ module.exports = NodeHelper.create({
9696
}
9797

9898
try {
99-
cb(calendar, data, null);
99+
this.parser(calendar, data, null);
100100
setTimeout(() => {
101-
this.scanCalendar(calendar, cb);
101+
this.scanCalendar(calendar);
102102
}, calendar.scanInterval);
103103
} catch (error) {
104-
cb(calendar, data, error);
104+
this.parser(calendar, data, error);
105105
Log.error(`[CALEXT2] Error: ${error}`);
106106

107107
const errorBody = await error.response.text();

0 commit comments

Comments
 (0)