mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
fix linting for grunt
This commit is contained in:
parent
c4a32cdb58
commit
f7be874e2c
@ -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: {
|
||||
|
@ -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"
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user