fix env var access using $env for groups

This commit is contained in:
Hiroyasu Nishiyama
2021-11-27 19:29:57 +09:00
parent 9439cd0e3d
commit c331da7323
4 changed files with 61 additions and 12 deletions

View File

@@ -439,8 +439,6 @@ class Flow {
}
}
return [env.name, env];
return [env.name, env];
});
group._env = Object.fromEntries(entries);
}
@@ -457,24 +455,24 @@ class Flow {
const val
= ((value === "true") ||
(value === true));
return {
return [{
val: val
};
}, null];
}
if (type === "cred") {
return {
return [{
val: value
};
}, null];
}
try {
var val = redUtil.evaluateNodeProperty(value, type, node, null, null);
return {
return [{
val: val
};
}, null];
}
catch (e) {
this.error(e);
return null;
return [null, null];
}
}
}
@@ -488,7 +486,7 @@ class Flow {
return this.getGroupEnvSetting(node, parent, name);
}
}
return null;
return [null, name];
}
@@ -545,6 +543,9 @@ class Flow {
}
}
}
else {
key = key.substring(8);
}
}
return this.parent.getSetting(key);
}

View File

@@ -373,10 +373,11 @@ class Subflow extends Flow {
const node = this.subflowInstance;
if (node.g) {
const group = this.getGroupNode(node.g);
const result = this.getGroupEnvSetting(node, group, name);
const [result, newName] = this.getGroupEnvSetting(node, group, name);
if (result) {
return result.val;
}
name = newName;
}