Handle credential env var evaluation when no value set

This commit is contained in:
Nick O'Leary 2023-09-22 13:56:54 +01:00
parent d9bbac20f3
commit 41797f8cef
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 2 additions and 2 deletions

View File

@ -161,14 +161,14 @@ class Flow {
for (let i = 0; i < configNodes.length; i++) {
const node = this.flow.configs[configNodes[i]]
if (node.type === 'global-config' && node.env) {
const nodeEnv = await flowUtil.evaluateEnvProperties(this, node.env, credentials.get(node.id))
const nodeEnv = await flowUtil.evaluateEnvProperties(this, node.env, credentials.get(node.id) || {})
this._env = { ...this._env, ...nodeEnv }
}
}
}
if (this.env) {
this._env = { ...this._env, ...await flowUtil.evaluateEnvProperties(this, this.env, credentials.get(this.id)) }
this._env = { ...this._env, ...await flowUtil.evaluateEnvProperties(this, this.env, credentials.get(this.id) || {}) }
}
// Initialise the group objects. These must be done in the right order