From b78ef006ec6798dd04d6e82d7af5cf58c40cc0b1 Mon Sep 17 00:00:00 2001 From: tilleul Date: Mon, 9 Mar 2020 11:22:20 +0100 Subject: [PATCH] Support for context stores using JSONata and evaluateNodeProperty() The function prepareJSONataExpression() does not take context store into account. This causes problems when using typedInput fields and getting the value of a property based on its type using evaluateNodeProperty(). --- packages/node_modules/@node-red/util/lib/util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/node_modules/@node-red/util/lib/util.js b/packages/node_modules/@node-red/util/lib/util.js index 45a33be14..cd273dfae 100644 --- a/packages/node_modules/@node-red/util/lib/util.js +++ b/packages/node_modules/@node-red/util/lib/util.js @@ -558,11 +558,11 @@ function evaluateNodeProperty(value, type, node, msg, callback) { */ function prepareJSONataExpression(value,node) { var expr = jsonata(value); - expr.assign('flowContext',function(val) { - return node.context().flow.get(val); + expr.assign('flowContext',function(val, store) { + return node.context().flow.get(val, store); }); - expr.assign('globalContext',function(val) { - return node.context().global.get(val); + expr.assign('globalContext',function(val, store) { + return node.context().global.get(val, store); }); expr.assign('env', function(name) { var val = getSetting(node, name);