1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Safely ignore subflow instance nodes in palette editor

This commit is contained in:
Nick O'Leary 2016-09-02 20:31:24 +01:00
parent aee483e9f1
commit 722b31edee

View File

@ -701,10 +701,12 @@ RED.palette.editor = (function() {
} }
}); });
RED.events.on('nodes:add', function(n) { RED.events.on('nodes:add', function(n) {
typesInUse[n.type] = (typesInUse[n.type]||0)+1; if (!/^subflow:/.test(n.type)) {
if (typesInUse[n.type] === 1) { typesInUse[n.type] = (typesInUse[n.type]||0)+1;
var ns = RED.nodes.registry.getNodeSetForType(n.type); if (typesInUse[n.type] === 1) {
refreshNodeModule(ns.module); var ns = RED.nodes.registry.getNodeSetForType(n.type);
refreshNodeModule(ns.module);
}
} }
}) })
RED.events.on('nodes:remove', function(n) { RED.events.on('nodes:remove', function(n) {