diff --git a/io/mdns/mdns.html b/io/mdns/mdns.html index 17e4be39..1e936059 100644 --- a/io/mdns/mdns.html +++ b/io/mdns/mdns.html @@ -92,7 +92,7 @@
  • msg.service - For a full list of official service types see this list.
  • msg.port - the tcp or udp port to use.
  • msg.name - the short description name of the service. If you use %h in the name, it will be replaced by the machine hostname.
  • -
  • msg.txtRecord - a set of comma separated name:value pairs
  • +
  • msg.txtRecord - a javascript object of name:value pairs.
  • diff --git a/io/mdns/mdns.js b/io/mdns/mdns.js index 966af28f..5d385fca 100644 --- a/io/mdns/mdns.js +++ b/io/mdns/mdns.js @@ -62,7 +62,7 @@ module.exports = function(RED) { this.txt = n.txt; if (this.txt && (this.txt !== '')) { try { this.txt = JSON.parse('{'+this.txt+'}'); } - catch (e) { delete this.txt; }; + catch (e) { delete this.txt; } } var node = this; @@ -77,7 +77,7 @@ module.exports = function(RED) { if (node.name || msg.name) { options.name = (node.name || msg.name).replace(/\%h/g, os.hostname()); } - if (node.txt || msg.txtRecord) { options.txtRecord = node.txt || msg.txtRecord }; + if (node.txt || msg.txtRecord) { options.txtRecord = node.txt || msg.txtRecord } node.ad = mdns.createAdvertisement(service, port, options); node.ad.start(); } diff --git a/io/mdns/package.json b/io/mdns/package.json index e85840a0..63619de2 100644 --- a/io/mdns/package.json +++ b/io/mdns/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-discovery", - "version" : "0.0.7", + "version" : "0.0.8", "description" : "A Node-RED node that uses Bonjour / Avahi to discover nearby services.", "dependencies" : { "mdns" : "2.2.*"