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

Handle null subflow object when clearing context

This commit is contained in:
Nick O'Leary 2023-03-03 20:02:46 +00:00
parent e91981207f
commit e47698bfd4
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -593,7 +593,7 @@ function clean(flowConfig) {
const knownNodes = new Set(Object.keys(flowConfig.allNodes)) const knownNodes = new Set(Object.keys(flowConfig.allNodes))
// We need to alias all of the subflow instance contents // We need to alias all of the subflow instance contents
for (const subflow of Object.values(flowConfig.subflows)) { for (const subflow of Object.values(flowConfig.subflows || {})) {
subflow.instances.forEach(instance => { subflow.instances.forEach(instance => {
for (const nodeId of Object.keys(subflow.nodes || {})) { for (const nodeId of Object.keys(subflow.nodes || {})) {
knownNodes.add(`${instance.id}-${nodeId}`) knownNodes.add(`${instance.id}-${nodeId}`)