Handle modified-nodes deploy after replacing unknown config node

Fixes #4548
This commit is contained in:
Nick O'Leary 2024-02-05 16:22:58 +00:00
parent 9bd7131914
commit 565c212779
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 6 additions and 2 deletions

View File

@ -1000,7 +1000,6 @@ RED.clipboard = (function() {
try {
RED.view.importNodes(newNodes, importOptions);
} catch(error) {
console.log(error.importConfig)
// Thrown for import_conflict
confirmImport(error.importConfig, newNodes, importOptions);
}

View File

@ -374,7 +374,12 @@ async function start(type,diff,muteLog,isDeploy) {
// A modified-type deploy means restarting things that have changed
// Update the global flow
activeFlows['global'].update(activeFlowConfig,activeFlowConfig);
if (activeFlows['global']) {
activeFlows['global'].update(activeFlowConfig,activeFlowConfig);
} else {
log.debug("red/nodes/flows.start : starting flow : global");
activeFlows['global'] = Flow.create(flowAPI,activeFlowConfig);
}
for (id in activeFlowConfig.flows) {
if (activeFlowConfig.flows.hasOwnProperty(id)) {
if (!activeFlowConfig.flows[id].disabled) {