1
0
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:
Hiroyasu Nishiyama 2019-01-29 21:39:59 +09:00
parent 0881c6a20b
commit ba3b64a6c6
2 changed files with 2 additions and 10 deletions

View File

@ -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 () {

View File

@ -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