diff --git a/nodes/io/25-serial.html b/nodes/io/25-serial.html
index 6e5adb1e2..2b0b37a40 100644
--- a/nodes/io/25-serial.html
+++ b/nodes/io/25-serial.html
@@ -42,7 +42,8 @@
outputs:1,
icon: "serial.png",
label: function() {
- return this.name||(this.serial)?RED.nodes.node(this.serial).label():"serial";
+ var serialNode = RED.nodes.node(this.serial);
+ return this.name||(serialNode?serialNode.label():"serial");
},
labelStyle: function() {
return this.name?"node_label_italic":"";
@@ -80,7 +81,8 @@
icon: "serial.png",
align: "right",
label: function() {
- return this.name||((this.serial)?RED.nodes.node(this.serial).label():"serial");
+ var serialNode = RED.nodes.node(this.serial);
+ return this.name||(serialNode?serialNode.label():"serial");
},
labelStyle: function() {
return this.name?"node_label_italic":"";
diff --git a/nodes/social/91-irc.html b/nodes/social/91-irc.html
index f2c5b4f0d..5c78784d4 100644
--- a/nodes/social/91-irc.html
+++ b/nodes/social/91-irc.html
@@ -42,7 +42,8 @@
outputs:1,
icon: "hash.png",
label: function() {
- return this.name||(this.ircserver)?RED.nodes.node(this.ircserver).label():"irc";
+ var ircNode = RED.nodes.node(this.ircserver);
+ return this.name||((ircNode?ircNode.label():"irc");
},
labelStyle: function() {
return this.name?"node_label_italic":"";
diff --git a/nodes/storage/66-mongodb.html b/nodes/storage/66-mongodb.html
index 6aa261814..4737d2e7e 100644
--- a/nodes/storage/66-mongodb.html
+++ b/nodes/storage/66-mongodb.html
@@ -86,7 +86,8 @@
icon: "mongodb.png",
align: "right",
label: function() {
- return this.name||((this.mongodb)?RED.nodes.node(this.mongodb).label()+"//"+this.collection:"mongodb");
+ var mongoNode = RED.nodes.node(this.mongodb);
+ return this.name||this.collection||(mongoNode?mongoNode.label():"mongodb");
},
labelStyle: function() {
return this.name?"node_label_italic":"";
@@ -129,7 +130,8 @@
outputs:1,
icon: "mongodb.png",
label: function() {
- return this.name||((this.mongodb)?RED.nodes.node(this.mongodb).label()+"//"+this.collection:"mongodb");
+ var mongoNode = RED.nodes.node(this.mongodb);
+ return this.name||(mongoNode?mongoNode.label()+"//"+this.collection:"mongodb");
},
labelStyle: function() {
return this.name?"node_label_italic":"";