mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
removed useless env setup & simplified env access in function node
This commit is contained in:
parent
0881c6a20b
commit
ba3b64a6c6
@ -158,13 +158,8 @@ module.exports = function(RED) {
|
||||
},
|
||||
env: {
|
||||
get: function(envVar) {
|
||||
if (node && node._flow) {
|
||||
var flow = node._flow;
|
||||
if (flow) {
|
||||
return flow.getSetting(envVar);
|
||||
}
|
||||
}
|
||||
return process.env[envVar];
|
||||
var flow = node._flow;
|
||||
return flow.getSetting(envVar);
|
||||
}
|
||||
},
|
||||
setTimeout: function () {
|
||||
|
@ -34,9 +34,6 @@ function Node(n) {
|
||||
if (n._alias) {
|
||||
this._alias = n._alias;
|
||||
}
|
||||
if (n.env) {
|
||||
this.env = n.env;
|
||||
}
|
||||
if (n._flow) {
|
||||
// Make this a non-enumerable property as it may cause
|
||||
// circular references. Any existing code that tries to JSON serialise
|
||||
|
Loading…
Reference in New Issue
Block a user