From ebb0d1a46dcc5ab6816393a55159a63591a6f492 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 17 Sep 2014 22:31:26 +0100 Subject: [PATCH] Handle invalid property values in Switch node Fixes #404 --- nodes/core/logic/10-switch.js | 38 +++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/nodes/core/logic/10-switch.js b/nodes/core/logic/10-switch.js index 237c83c39..8bcb85718 100644 --- a/nodes/core/logic/10-switch.js +++ b/nodes/core/logic/10-switch.js @@ -38,8 +38,8 @@ module.exports = function(RED) { this.rules = n.rules; this.property = n.property; this.checkall = n.checkall || "true"; - var propertyParts = n.property.split("."), - node = this; + var propertyParts = n.property.split("."); + var node = this; for (var i=0; i