From 407e16e9009db75f901e4b03f1cc1056cbaef9ed Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Tue, 10 Jul 2018 20:40:52 +0900 Subject: [PATCH] Fix appearrence of switch node port label for flow/global ref. (#1793) * fix appearrence of switch node port label for flow/global ref * use RED.utils.parseContextKey --- nodes/core/logic/10-switch.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nodes/core/logic/10-switch.html b/nodes/core/logic/10-switch.html index f4ffc7dea..a57ce2187 100644 --- a/nodes/core/logic/10-switch.html +++ b/nodes/core/logic/10-switch.html @@ -99,11 +99,17 @@ } return v; } + function prop2name(key) { + var result = RED.utils.parseContextKey(key); + return result.key; + } function getValueLabel(t,v) { if (t === 'str') { return '"'+clipValueLength(v)+'"'; - } else if (t === 'msg' || t==='flow' || t==='global') { + } else if (t === 'msg') { return t+"."+clipValueLength(v); + } else if (t === 'flow' || t === 'global') { + return t+"."+clipValueLength(prop2name(v)); } return clipValueLength(v); }