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

Fix palette-editor handling of subflows

This commit is contained in:
Nick O'Leary 2016-08-26 13:21:33 +01:00
parent 57479edc59
commit 91c23d1f7d

View File

@ -664,12 +664,16 @@ RED.palette.editor = (function() {
refreshNodeModule(ns.module); refreshNodeModule(ns.module);
}); });
RED.events.on('registry:node-type-added', function(nodeType) { RED.events.on('registry:node-type-added', function(nodeType) {
if (!/^subflow:/.test(nodeType)) {
var ns = RED.nodes.registry.getNodeSetForType(nodeType); var ns = RED.nodes.registry.getNodeSetForType(nodeType);
refreshNodeModule(ns.module); refreshNodeModule(ns.module);
}
}); });
RED.events.on('registry:node-type-removed', function(nodeType) { RED.events.on('registry:node-type-removed', function(nodeType) {
if (!/^subflow:/.test(nodeType)) {
var ns = RED.nodes.registry.getNodeSetForType(nodeType); var ns = RED.nodes.registry.getNodeSetForType(nodeType);
refreshNodeModule(ns.module); refreshNodeModule(ns.module);
}
}); });
RED.events.on('registry:node-set-added', function(ns) { RED.events.on('registry:node-set-added', function(ns) {
refreshNodeModule(ns.module); refreshNodeModule(ns.module);