diff --git a/hardware/intel/mraa-gpio-led.js b/hardware/intel/mraa-gpio-led.js index 7135bab5..477fcb74 100644 --- a/hardware/intel/mraa-gpio-led.js +++ b/hardware/intel/mraa-gpio-led.js @@ -70,7 +70,9 @@ module.exports = function(RED) { if (this.pin == 0) { this.user1_green.close(); this.user1_red.close(); - } if(this.pin == 1) { + } + + if (this.pin == 1) { this.user2_green.close(); this.user2_red.close(); } diff --git a/hardware/scanBLE/101-scanBLE.js b/hardware/scanBLE/101-scanBLE.js index ab0208ac..6e79e568 100644 --- a/hardware/scanBLE/101-scanBLE.js +++ b/hardware/scanBLE/101-scanBLE.js @@ -21,8 +21,8 @@ module.exports = function(RED) { }); noble.on('scanStart', function(msg) { - let msg = {}; - msg.topic = node.topic; + msg = {}; + msg.topic = node.topic || msg.topic; msg.payload = "Scanning initiated..." //debugging //console.log('scanning initiated...'); node.send(msg);