From 400f51d921e47e841d2509d0ad057a39f1f71ab5 Mon Sep 17 00:00:00 2001 From: Dave C-J Date: Tue, 9 Sep 2014 22:14:52 +0100 Subject: [PATCH] Allow IRC name changes when node chanel not set. Trying to f ix #397 --- nodes/core/social/91-irc.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); }