@node-red/runtime 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/flows/Flow.js CHANGED
@@ -439,8 +439,6 @@ class Flow {
439
439
  }
440
440
  }
441
441
  return [env.name, env];
442
-
443
- return [env.name, env];
444
442
  });
445
443
  group._env = Object.fromEntries(entries);
446
444
  }
@@ -457,24 +455,24 @@ class Flow {
457
455
  const val
458
456
  = ((value === "true") ||
459
457
  (value === true));
460
- return {
458
+ return [{
461
459
  val: val
462
- };
460
+ }, null];
463
461
  }
464
462
  if (type === "cred") {
465
- return {
463
+ return [{
466
464
  val: value
467
- };
465
+ }, null];
468
466
  }
469
467
  try {
470
468
  var val = redUtil.evaluateNodeProperty(value, type, node, null, null);
471
- return {
469
+ return [{
472
470
  val: val
473
- };
471
+ }, null];
474
472
  }
475
473
  catch (e) {
476
474
  this.error(e);
477
- return null;
475
+ return [null, null];
478
476
  }
479
477
  }
480
478
  }
@@ -488,7 +486,7 @@ class Flow {
488
486
  return this.getGroupEnvSetting(node, parent, name);
489
487
  }
490
488
  }
491
- return null;
489
+ return [null, name];
492
490
  }
493
491
 
494
492
 
@@ -545,6 +543,9 @@ class Flow {
545
543
  }
546
544
  }
547
545
  }
546
+ else {
547
+ key = key.substring(8);
548
+ }
548
549
  }
549
550
  return this.parent.getSetting(key);
550
551
  }
@@ -373,10 +373,11 @@ class Subflow extends Flow {
373
373
  const node = this.subflowInstance;
374
374
  if (node.g) {
375
375
  const group = this.getGroupNode(node.g);
376
- const result = this.getGroupEnvSetting(node, group, name);
376
+ const [result, newName] = this.getGroupEnvSetting(node, group, name);
377
377
  if (result) {
378
378
  return result.val;
379
379
  }
380
+ name = newName;
380
381
  }
381
382
 
382
383
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/runtime",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./lib/index.js",
6
6
  "repository": {
@@ -16,8 +16,8 @@
16
16
  }
17
17
  ],
18
18
  "dependencies": {
19
- "@node-red/registry": "2.1.3",
20
- "@node-red/util": "2.1.3",
19
+ "@node-red/registry": "2.1.4",
20
+ "@node-red/util": "2.1.4",
21
21
  "async-mutex": "0.3.2",
22
22
  "clone": "2.1.2",
23
23
  "express": "4.17.1",