mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Merge pull request #3754 from braincube-io/fix-change-context
Fix change node, not handling from field properly when using context
This commit is contained in:
		@@ -168,9 +168,9 @@ module.exports = function(RED) {
 | 
			
		||||
                        return getFromValueType(RED.util.getMessageProperty(msg,rule.from),done);
 | 
			
		||||
                    } else if (rule.fromt === 'flow' || rule.fromt === 'global') {
 | 
			
		||||
                        var contextKey = RED.util.parseContextStore(rule.from);
 | 
			
		||||
                        if (/\[msg\./.test(context.key)) {
 | 
			
		||||
                        if (/\[msg\./.test(contextKey.key)) {
 | 
			
		||||
                            // The key has a nest msg. reference to evaluate first
 | 
			
		||||
                            context.key = RED.util.normalisePropertyExpression(contextKey.key,msg,true);
 | 
			
		||||
                            contextKey.key = RED.util.normalisePropertyExpression(contextKey.key,msg,true);
 | 
			
		||||
                        }
 | 
			
		||||
                        node.context()[rule.fromt].get(contextKey.key, contextKey.store, (err,fromValue) => {
 | 
			
		||||
                            if (err) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user