From 2f882913f037e95f568c6dbde4c71f4f1e04899f Mon Sep 17 00:00:00 2001 From: Mark Hindess Date: Thu, 31 Jul 2014 08:36:54 +0100 Subject: [PATCH] Fix missing types logic. missingTypes.length was greater than zero so the only way it can be zero immediately afterwards is if splice is called so move the zero check after the splice. Despite what istanbul reports this function is covered by the tests. --- red/nodes/flows.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/red/nodes/flows.js b/red/nodes/flows.js index 3294c1d87..b0b5d5146 100644 --- a/red/nodes/flows.js +++ b/red/nodes/flows.js @@ -34,9 +34,9 @@ events.on('type-registered',function(type) { if (i != -1) { missingTypes.splice(i,1); util.log("[red] Missing type registered: "+type); - } - if (missingTypes.length === 0) { - parseConfig(); + if (missingTypes.length === 0) { + parseConfig(); + } } } });