diff --git a/nodes/core/social/91-irc.html b/nodes/core/social/91-irc.html index 6592d42a3..11112374c 100644 --- a/nodes/core/social/91-irc.html +++ b/nodes/core/social/91-irc.html @@ -99,13 +99,13 @@ icon: "hash.png", label: function() { var ircNode = RED.nodes.node(this.ircserver); - return this.name||(ircNode?ircNode.label():"irc"); + return this.name || (ircNode ? ircNode.label() : "irc"); }, labelStyle: function() { return this.name?"node_label_italic":""; }, oneditprepare: function() { - if (this.ircserver !== undefined) { + if ((this.ircserver !== undefined) && (this.ircserver !== "")) { this.channel = this.channel || RED.nodes.node(this.ircserver).channel; $("#node-input-channel").val(this.channel); } @@ -165,13 +165,13 @@ icon: "hash.png", align: "right", label: function() { - return this.name || (this.ircserver)?RED.nodes.node(this.ircserver).label():"irc"; + return this.name || (this.ircserver ? RED.nodes.node(this.ircserver).label() : "irc"); }, labelStyle: function() { return this.name?"node_label_italic":""; }, oneditprepare: function() { - if (this.ircserver !== undefined) { + if ((this.ircserver !== undefined) && (this.ircserver !== "")) { this.channel = this.channel || RED.nodes.node(this.ircserver).channel; $("#node-input-channel").val(this.channel); }