1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Test for broken XML in WeMo response (#250)

Thanks @hardillb
This commit is contained in:
Ben Hardill 2016-11-09 08:44:07 +00:00 committed by Dave Conway-Jones
parent f2bac89911
commit 2b6661c4f2
2 changed files with 48 additions and 46 deletions

View File

@ -100,6 +100,7 @@ WeMoNG.prototype.start = function start() {
res.on('end',function() {
xml2js.parseString(data, function(err, result) {
if(!err) {
if (result["s:Envelope"]) {
var list = result["s:Envelope"]["s:Body"][0]["u:GetEndDevicesResponse"][0].DeviceLists[0];
xml2js.parseString(list, function(err, result2) {
if (!err) {
@ -154,6 +155,7 @@ WeMoNG.prototype.start = function start() {
}
});
}
}
});
});
});

View File

@ -1,6 +1,6 @@
{
"name": "node-red-node-wemo",
"version": "0.1.8",
"version": "0.1.9",
"description": "Input and Output nodes for Belkin WeMo devices",
"repository": "https://github.com/node-red/node-red-nodes/tree/master/hardware",
"main": "WeMoNG.js",