From 1c44b0bc98328579e98621ea56d33a8bfae4abdf Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Sun, 15 Sep 2019 23:44:01 +0900 Subject: [PATCH 1/2] Fix subflow UI for select --- .../@node-red/editor-client/src/js/ui/subflow.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js index ed7cf134c..05ef03e81 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js @@ -1360,14 +1360,19 @@ RED.subflow = (function() { } function buildEnvUIRow(row, tenv, ui) { - ui.label = ui.label||{}; - ui.opts = ui.opts||{}; if (!ui.type) { ui.type = "input"; ui.opts = {types:['str','num','bool','json','bin','env']} } else { - ui.opts = ui.opts || {}; + var typeOptions = { + 'input': {types:['str','num','bool','json','bin','env']}, + 'select': {opts:[]}, + 'spinner': {} + }; + if (!ui.opts) { + ui.opts = (ui.type === "select") ? {opts:[]} : {}; + } } var labels = ui.label || {}; From 6ef49152f3780a2c83e3588f67028c31047f9ba5 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Sun, 15 Sep 2019 23:55:27 +0900 Subject: [PATCH 2/2] remove useless variable definition --- .../@node-red/editor-client/src/js/ui/subflow.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js index 05ef03e81..b888f0112 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js @@ -1365,11 +1365,6 @@ RED.subflow = (function() { ui.type = "input"; ui.opts = {types:['str','num','bool','json','bin','env']} } else { - var typeOptions = { - 'input': {types:['str','num','bool','json','bin','env']}, - 'select': {opts:[]}, - 'spinner': {} - }; if (!ui.opts) { ui.opts = (ui.type === "select") ? {opts:[]} : {}; }