mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
@@ -102,6 +102,9 @@ async function evaluateEnvProperties(flow, env, credentials) {
|
||||
pendingEvaluations.push(new Promise((resolve, _) => {
|
||||
redUtil.evaluateNodeProperty(value, 'jsonata', {_flow: flow}, null, (err, result) => {
|
||||
if (!err) {
|
||||
if (typeof result === 'object') {
|
||||
result = { value: result, __clone__: true}
|
||||
}
|
||||
evaluatedEnv[name] = result
|
||||
}
|
||||
resolve()
|
||||
@@ -109,6 +112,9 @@ async function evaluateEnvProperties(flow, env, credentials) {
|
||||
}))
|
||||
} else {
|
||||
value = redUtil.evaluateNodeProperty(value, type, {_flow: flow}, null, null);
|
||||
if (typeof value === 'object') {
|
||||
value = { value: value, __clone__: true}
|
||||
}
|
||||
}
|
||||
evaluatedEnv[name] = value
|
||||
}
|
||||
@@ -138,8 +144,13 @@ async function evaluateEnvProperties(flow, env, credentials) {
|
||||
}
|
||||
}}, null, null);
|
||||
}
|
||||
if (typeof value === 'object' && !value.__clone__) {
|
||||
value = { value: value, __clone__: true}
|
||||
}
|
||||
evaluatedEnv[name] = value
|
||||
|
||||
}
|
||||
// console.log(evaluatedEnv)
|
||||
|
||||
return evaluatedEnv
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user