From ec7e594ec104a3e29702f61d40762fb39663367f Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 14 Jul 2023 17:14:39 +0100 Subject: [PATCH] Add NR_SUBFLOW_NAME/ID/PATH env vars Closes #4239 --- .../node_modules/@node-red/runtime/lib/flows/Subflow.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/node_modules/@node-red/runtime/lib/flows/Subflow.js b/packages/node_modules/@node-red/runtime/lib/flows/Subflow.js index 4588e3d9b..ef405c6c7 100644 --- a/packages/node_modules/@node-red/runtime/lib/flows/Subflow.js +++ b/packages/node_modules/@node-red/runtime/lib/flows/Subflow.js @@ -341,13 +341,13 @@ class Subflow extends Flow { getSetting(key) { const node = this.subflowInstance; if (node) { - if (key === "NR_NODE_NAME") { + if (key === "NR_NODE_NAME" || key === "NR_SUBFLOW_NAME") { return node.name; } - if (key === "NR_NODE_ID") { + if (key === "NR_NODE_ID" || key === "NR_SUBFLOW_ID") { return node.id; } - if (key === "NR_NODE_PATH") { + if (key === "NR_NODE_PATH" || key === "NR_SUBFLOW_PATH") { return node._path; } }