Revert and force getSetting to use the local node

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
This commit is contained in:
Gauthier Dandele 2024-10-28 18:01:42 +01:00 committed by GitHub
parent 2fd7aee4da
commit f67268b89a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,11 +22,6 @@ module.exports = function(RED) {
var acorn = require("acorn"); var acorn = require("acorn");
var acornWalk = require("acorn-walk"); 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) { function sendResults(node,send,_msgid,msgs,cloneFirstMessage) {
if (msgs == null) { if (msgs == null) {
return; return;
@ -171,11 +166,9 @@ module.exports = function(RED) {
RED: { RED: {
util: { util: {
...RED.util, ...RED.util,
getSetting: function (node, name, flow) { getSetting: function (_node, name, _flow) {
if (envVarExcludes[name]) { // Ensure `node` argument is the Function node and do not allow flow to be overridden.
return undefined; return RED.util.getSetting(node, name);
}
return RED.util.getSetting(node, name, flow);
} }
} }
}, },