From 722b31edee341c4634b81c983d8db71e5fd9dc57 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 2 Sep 2016 20:31:24 +0100 Subject: [PATCH] Safely ignore subflow instance nodes in palette editor --- editor/js/ui/palette-editor.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/editor/js/ui/palette-editor.js b/editor/js/ui/palette-editor.js index 0757dc7dc..08320190c 100644 --- a/editor/js/ui/palette-editor.js +++ b/editor/js/ui/palette-editor.js @@ -701,10 +701,12 @@ RED.palette.editor = (function() { } }); RED.events.on('nodes:add', function(n) { - typesInUse[n.type] = (typesInUse[n.type]||0)+1; - if (typesInUse[n.type] === 1) { - var ns = RED.nodes.registry.getNodeSetForType(n.type); - refreshNodeModule(ns.module); + if (!/^subflow:/.test(n.type)) { + typesInUse[n.type] = (typesInUse[n.type]||0)+1; + if (typesInUse[n.type] === 1) { + var ns = RED.nodes.registry.getNodeSetForType(n.type); + refreshNodeModule(ns.module); + } } }) RED.events.on('nodes:remove', function(n) {