Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
fixed bug with the code prepared for Node-Red 1.0
  • Loading branch information
Hypnos3 committed Sep 26, 2019
1 parent 91f4a35 commit 168afb7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### CHANGELOG

#### 0.1.13: critical bug fix

- fixed bug with the code prepared for Node-Red 1.0. The recommend way for be backward compatible doesn't work. This is [also](https://discourse.nodered.org/t/knowing-when-a-node-is-done-new-node-api/15737/9) confirmed by @knolleary.

#### 0.1.12: Maintenance Release

- more changes for node-red 1.0 (https://nodered.org/blog/2019/09/20/node-done)
Expand Down
12 changes: 3 additions & 9 deletions german-holidays.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,18 +636,12 @@ module.exports = function (RED) {

return this.getDataForDate(date, daysObjects, 0);
};

this.done = (text, msg) => {
if (text) {
return this.error(text, msg);
}
return null;
};
const node = this;

this.on('input', function (msg, send, done) {
// If this is pre-1.0, 'send' will be undefined, so fallback to node.send
send = send || this.send;
done = done || this.done;
done = done || function (text, msg) { if (text) { return node.error(text, msg); } return null; };
send = send || function (...args) { node.send.apply(node, args); };
// this.debug('Holiday!! Start');
try {
/********************************************
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-german-holidays",
"version": "0.1.12",
"version": "0.1.13",
"description": "NodeRED nodes to get german holidays",
"keywords": [
"node-red",
Expand Down

0 comments on commit 168afb7

Please sign in to comment.