From f7be874e2c00a4e447f496f3137b60574d1ccfb1 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Fri, 12 Mar 2021 09:36:20 +0000 Subject: [PATCH] fix linting for grunt --- social/xmpp/92-xmpp.js | 10 ++++++---- social/xmpp/package.json | 2 +- test/hardware/PiGpio/36-rpi-gpio_spec.js | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/social/xmpp/92-xmpp.js b/social/xmpp/92-xmpp.js index d7eb0f7b..6326c7a8 100644 --- a/social/xmpp/92-xmpp.js +++ b/social/xmpp/92-xmpp.js @@ -470,11 +470,12 @@ module.exports = function(RED) { if (stanza.attrs.type === 'error') { var error = stanza.getChild('error'); if (error.attrs.code) { + var reas = ""; try { - var reas = error.toString().split('><')[1].split(" xml")[0].trim(); + reas = error.toString().split('><')[1].split(" xml")[0].trim(); if (reas == "registration-required") { reas = "membership-required"; } } - catch(e) {}; + catch(e) {} var msg = { topic:stanza.attrs.from, payload: { @@ -692,11 +693,12 @@ module.exports = function(RED) { if (stanza.attrs.type === 'error') { var error = stanza.getChild('error'); if (error.attrs.code) { + var reas = ""; try { - var reas = error.toString().split('><')[1].split(" xml")[0].trim(); + reas = error.toString().split('><')[1].split(" xml")[0].trim(); if (reas == "registration-required") { reas = "membership-required"; } } - catch(e) {}; + catch(e) {} var msg = { topic:stanza.attrs.from, payload: { diff --git a/social/xmpp/package.json b/social/xmpp/package.json index 67f60f84..7b611b78 100644 --- a/social/xmpp/package.json +++ b/social/xmpp/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-xmpp", - "version": "0.5.0", + "version": "0.5.1", "description": "A Node-RED node to talk to an XMPP server", "dependencies": { "@xmpp/client": "^0.12.0" diff --git a/test/hardware/PiGpio/36-rpi-gpio_spec.js b/test/hardware/PiGpio/36-rpi-gpio_spec.js index 17912bd0..d4c7ddf0 100644 --- a/test/hardware/PiGpio/36-rpi-gpio_spec.js +++ b/test/hardware/PiGpio/36-rpi-gpio_spec.js @@ -99,7 +99,7 @@ describe('RPI GPIO Node', function() { var n2 = helper.getNode("n2"); n2.on("input", function(msg) { try { - msg.should.have.property('topic', 'pi/7'); + msg.should.have.property('topic', 'gpio/7'); msg.should.have.property('payload', 1); done(); } catch(err) { @@ -117,7 +117,7 @@ describe('RPI GPIO Node', function() { var n2 = helper.getNode("n2"); n2.on("input", function(msg) { try { - msg.should.have.property('topic', 'pi/11'); + msg.should.have.property('topic', 'gpio/11'); msg.should.have.property('payload', 0); done(); } catch(err) {