diff --git a/packages/node_modules/@node-red/nodes/core/function/10-function.js b/packages/node_modules/@node-red/nodes/core/function/10-function.js index 8d365722f..413830b72 100644 --- a/packages/node_modules/@node-red/nodes/core/function/10-function.js +++ b/packages/node_modules/@node-red/nodes/core/function/10-function.js @@ -22,6 +22,11 @@ module.exports = function(RED) { var acorn = require("acorn"); var acornWalk = require("acorn-walk"); + const envVarExcludes = {}; + if (RED.settings.envVarExcludes && Array.isArray(RED.settings.envVarExcludes)) { + RED.settings.envVarExcludes.forEach((e) => envVarExcludes[e] = true); + } + function sendResults(node,send,_msgid,msgs,cloneFirstMessage) { if (msgs == null) { return; @@ -158,11 +163,6 @@ module.exports = function(RED) { node.outstandingIntervals = []; node.clearStatus = false; - const envVarExcludes = {}; - if (RED.settings.envVarExcludes && Array.isArray(RED.settings.envVarExcludes)) { - RED.settings.envVarExcludes.forEach((e) => envVarExcludes[e] = true); - } - var sandbox = { console:console, util:util,