mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
evaluate env var after path initialization
This commit is contained in:
parent
bffb91f196
commit
6a41cbebc9
@ -77,15 +77,16 @@ function createNode(flow,config) {
|
|||||||
if (typeof nodeTypeConstructor === "function") {
|
if (typeof nodeTypeConstructor === "function") {
|
||||||
var conf = clone(config);
|
var conf = clone(config);
|
||||||
delete conf.credentials;
|
delete conf.credentials;
|
||||||
for (var p in conf) {
|
|
||||||
if (conf.hasOwnProperty(p)) {
|
|
||||||
mapEnvVarProperties(conf,p,flow,conf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
Object.defineProperty(conf,'_module', {value: typeRegistry.getNodeInfo(type), enumerable: false, writable: true })
|
Object.defineProperty(conf,'_module', {value: typeRegistry.getNodeInfo(type), enumerable: false, writable: true })
|
||||||
Object.defineProperty(conf,'_flow', {value: flow, enumerable: false, writable: true })
|
Object.defineProperty(conf,'_flow', {value: flow, enumerable: false, writable: true })
|
||||||
Object.defineProperty(conf,'_path', {value: `${flow.path}/${config._alias||config.id}`, enumerable: false, writable: true })
|
Object.defineProperty(conf,'_path', {value: `${flow.path}/${config._alias||config.id}`, enumerable: false, writable: true })
|
||||||
|
|
||||||
|
for (var p in conf) {
|
||||||
|
if (conf.hasOwnProperty(p)) {
|
||||||
|
mapEnvVarProperties(conf,p,flow,conf);
|
||||||
|
}
|
||||||
|
}
|
||||||
newNode = new nodeTypeConstructor(conf);
|
newNode = new nodeTypeConstructor(conf);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
Log.log({
|
Log.log({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user