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 0120d8c92..71f6e15d6 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 @@ -111,8 +111,6 @@ module.exports = function(RED) { throw new Error(RED._("function.error.externalModuleNotAllowed")); } - - var functionText = "var results = null;"+ "results = (async function(msg,__send__,__done__){ "+ "var __msgid__ = msg._msgid;"+ @@ -166,7 +164,13 @@ module.exports = function(RED) { Buffer:Buffer, Date: Date, RED: { - util: RED.util + util: { + ...RED.util, + getSetting: function (_node, name, _flow) { + // Ensure `node` argument is the Function node and do not allow flow to be overridden. + return RED.util.getSetting(node, name); + } + } }, __node__: { id: node.id,