mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	Add extra check for empty results in discovery (#304)
This commit is contained in:
		
				
					committed by
					
						
						Dave Conway-Jones
					
				
			
			
				
	
			
			
			
						parent
						
							d48644e16a
						
					
				
				
					commit
					6168f7ef34
				
			@@ -123,7 +123,7 @@ WeMoNG.prototype.start = function start() {
 | 
			
		||||
    request.get(location.href, function(err, res, xml) {
 | 
			
		||||
      if (!err) {
 | 
			
		||||
        xml2js.parseString(xml, function(err, json) {
 | 
			
		||||
          if (!err && json) {
 | 
			
		||||
          if (!err && json && json.root) {
 | 
			
		||||
            var device = { ip: location.hostname, port: location.port };
 | 
			
		||||
            for (var key in json.root.device[0]) {
 | 
			
		||||
              device[key] = json.root.device[0][key][0];
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "node-red-node-wemo",
 | 
			
		||||
  "version": "0.1.11",
 | 
			
		||||
  "version": "0.1.12",
 | 
			
		||||
  "description": "Input and Output nodes for Belkin WeMo devices",
 | 
			
		||||
  "repository": "https://github.com/node-red/node-red-nodes/tree/master/hardware",
 | 
			
		||||
  "main": "WeMoNG.js",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user