mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #4250 from node-red/4239-add-nr-subflow-name-env
Add NR_SUBFLOW_NAME/ID/PATH env vars
This commit is contained in:
commit
d5baa402c8
@ -341,13 +341,13 @@ class Subflow extends Flow {
|
|||||||
getSetting(key) {
|
getSetting(key) {
|
||||||
const node = this.subflowInstance;
|
const node = this.subflowInstance;
|
||||||
if (node) {
|
if (node) {
|
||||||
if (key === "NR_NODE_NAME") {
|
if (key === "NR_NODE_NAME" || key === "NR_SUBFLOW_NAME") {
|
||||||
return node.name;
|
return node.name;
|
||||||
}
|
}
|
||||||
if (key === "NR_NODE_ID") {
|
if (key === "NR_NODE_ID" || key === "NR_SUBFLOW_ID") {
|
||||||
return node.id;
|
return node.id;
|
||||||
}
|
}
|
||||||
if (key === "NR_NODE_PATH") {
|
if (key === "NR_NODE_PATH" || key === "NR_SUBFLOW_PATH") {
|
||||||
return node._path;
|
return node._path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user