Move envVarExcludes to the top scope

This commit is contained in:
GogoVega 2024-10-24 13:44:40 +02:00
parent 7555e0644f
commit 2fd7aee4da
No known key found for this signature in database
GPG Key ID: E1E048B63AC5AC2B

View File

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