diff --git a/nodes/core/core/80-function.js b/nodes/core/core/80-function.js index b771d1c91..9ddcbdbe1 100644 --- a/nodes/core/core/80-function.js +++ b/nodes/core/core/80-function.js @@ -90,7 +90,34 @@ module.exports = function(RED) { } }, context: { - global:RED.settings.functionGlobalContext || {} + set: function() { + node.context().set.apply(node,arguments); + }, + get: function() { + return node.context().get.apply(node,arguments); + }, + get global() { + return node.context().global; + }, + get flow() { + return node.context().flow; + } + }, + flow: { + set: function() { + node.context().flow.set.apply(node,arguments); + }, + get: function() { + return node.context().flow.get.apply(node,arguments); + } + }, + global: { + set: function() { + node.context().global.set.apply(node,arguments); + }, + get: function() { + return node.context().global.get.apply(node,arguments); + } }, setTimeout: function () { var func = arguments[0];