From 0d680a58f3cfb0a447f8ae3a66106b1e4f2296a7 Mon Sep 17 00:00:00 2001 From: Nam Giang Date: Wed, 14 Aug 2019 15:11:03 -0700 Subject: [PATCH] removed expensive try/catch --- .../@node-red/nodes/core/logic/10-switch.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/logic/10-switch.html b/packages/node_modules/@node-red/nodes/core/logic/10-switch.html index cef869741..a5b5ab075 100644 --- a/packages/node_modules/@node-red/nodes/core/logic/10-switch.html +++ b/packages/node_modules/@node-red/nodes/core/logic/10-switch.html @@ -262,21 +262,21 @@ resizeRule(container); var type = selectField.val(); - try { + if (valueField){ valueField.typedInput('hide'); - } catch(e){} - try { + } + if (expValueField){ expValueField.typedInput('hide'); - } catch(e){} - try { + } + if (numValueField){ numValueField.typedInput('hide'); - } catch(e){} - try { + } + if (typeValueField){ typeValueField.typedInput('hide'); - } catch(e){} - try { + } + if (btwnValue2Field){ btwnValue2Field.typedInput('hide'); - } catch(e){} + } if ((type === "btwn") || (type === "index")) { if (!btwnValueField){