node-red-contrib-boolean-logic-ultimate 1.1.15 → 1.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
 
4
4
  # CHANGELOG
5
5
 
6
+ <p>
7
+ <b>Version 1.1.17</b> September 2024<br/>
8
+ - Railway Switcher: fixed an issue caused by fixing an issue for backward compatibility of true/false input msg. The node was emitting 0 and 1 instead of true and false</br>
9
+ </p>
10
+ <p>
11
+ <b>Version 1.1.16</b> August 2024<br/>
12
+ - Railway Switcher: fixed an issue for backward compatibility of true/false input msg.</br>
13
+ </p>
6
14
  <p>
7
15
  <b>Version 1.1.15</b> August 2024<br/>
8
16
  - Railway Switcher: now you can choose between 5 different output instead of 2.</br>
@@ -38,8 +38,10 @@ module.exports = function (RED) {
38
38
  node.alignStatus();
39
39
 
40
40
  this.on("input", function (msg) {
41
+
41
42
  var sIncomingTopic = "";
42
43
  if (msg.hasOwnProperty("topic")) {
44
+
43
45
  // 06/11/2019
44
46
  if (!msg.hasOwnProperty("topic") || msg.topic === undefined)
45
47
  msg.topic = "NoTopicReceived";
@@ -48,6 +50,12 @@ module.exports = function (RED) {
48
50
  ""
49
51
  ); // Cut unwanted Characters
50
52
  if (sIncomingTopic === node.sTriggerTopic) {
53
+ // Backward compatibility
54
+ // Pass msg.payload = false switches the msg input to the UPPER output
55
+ // Pass msg.payload = true switches the msg input to the LOWER output
56
+ if (msg.payload === false) msg.payload = '0';
57
+ if (msg.payload === true) msg.payload = '1';
58
+
51
59
  const utils = require("./utils.js");
52
60
  let sPayload = utils.fetchFromObject(
53
61
  msg,
@@ -70,11 +78,6 @@ module.exports = function (RED) {
70
78
  );
71
79
  if (msg.payload === undefined) return null;
72
80
 
73
- // Backward compatibility
74
- // Pass msg.payload = false switches the msg input to the UPPER output
75
- // Pass msg.payload = true switches the msg input to the LOWER output
76
- if (msg.payload === false) msg.payload = '0';
77
- if (msg.payload === true) msg.payload = '1';
78
81
  node.sRailway = msg.payload;
79
82
  node.alignStatus();
80
83
  return; // DONT'S SEND THIS MESSAGE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-boolean-logic-ultimate",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "description": "A set of Node-RED enhanced boolean logic and utility nodes, flow interruption, blinker, invert, filter, toggle etc.., with persistent values after reboot. Compatible also with Homeassistant values.",
5
5
  "author": "Supergiovane (https://github.com/Supergiovane)",
6
6
  "dependencies": {