From 496b5a092fc6fcdda51d783fa3c439f4dda41275 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 15 Dec 2020 17:20:22 +0000 Subject: [PATCH] Ensure subflow credential objects exist Fixes #2783 --- packages/node_modules/@node-red/runtime/lib/flows/Subflow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/runtime/lib/flows/Subflow.js b/packages/node_modules/@node-red/runtime/lib/flows/Subflow.js index 78ec9ee75..d8514dac4 100644 --- a/packages/node_modules/@node-red/runtime/lib/flows/Subflow.js +++ b/packages/node_modules/@node-red/runtime/lib/flows/Subflow.js @@ -117,8 +117,8 @@ class Subflow extends Flow { this.node_map = node_map; this.path = parent.path+"/"+(subflowInstance._alias||subflowInstance.id); - this.templateCredentials = credentials.get(subflowDef.id); - this.instanceCredentials = credentials.get(this.id); + this.templateCredentials = credentials.get(subflowDef.id) || {}; + this.instanceCredentials = credentials.get(this.id) || {}; var env = []; if (this.subflowDef.env) {