mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
convert subflow env vars to dict
This commit is contained in:
@@ -567,17 +567,19 @@ describe('Subflow', function() {
|
||||
});
|
||||
|
||||
describe("#env var", function() {
|
||||
// should be changed according to internal env var representation
|
||||
function setEnv(node, key, val) {
|
||||
var flow = node._flow;
|
||||
if (flow) {
|
||||
var sfi = flow.subflowInstance;
|
||||
sfi.env = [
|
||||
{
|
||||
var env = flow.env;
|
||||
if (!env) {
|
||||
env = flow.env = {};
|
||||
}
|
||||
env[key] = {
|
||||
name: key,
|
||||
type: "str",
|
||||
value: val
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user