Lint mistake - fix mdns node

This commit is contained in:
dceejay 2015-05-08 23:03:51 +01:00
parent 5dbf104048
commit 87c93dc925
3 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@
<li><b>msg.service</b> - For a full list of official service types see <i><a href="http://www.dns-sd.org/ServiceTypes.html" target="_new">this list</a></i>.</li>
<li><b>msg.port</b> - the tcp or udp port to use.</li>
<li><b>msg.name</b> - the short description name of the service. If you use %h in the name, it will be replaced by the machine hostname.</li>
<li><b>msg.txtRecord</b> - a set of comma separated name:value pairs </li>
<li><b>msg.txtRecord</b> - a javascript object of name:value pairs.</li>
</ul></p>
</script>

View File

@ -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();
}

View File

@ -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.*"