Skip to content

Commit 57ef866

Browse files
committed
fix(ActionCreator): Change Data Source search location to msg.payload instead msg
BREAKING CHANGE: The incoming message's Data Source is no longer checked at root level but at msg.payload. This change was made to keep consistent with the way Node-RED handles messaging.
1 parent 8ce27f8 commit 57ef866

File tree

3 files changed

+5419
-2106
lines changed

3 files changed

+5419
-2106
lines changed

nodes/ActionCreator/ActionCreator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ module.exports = function(RED){
1111
if (config.dataSource === '') {
1212
msg.action = action;
1313
} else {
14-
if (msg[config.dataSource] === undefined) {
14+
if (msg.payload[config.dataSource] === undefined) {
1515
node.error('Message object did not contain field specified in Data Source field');
1616
} else {
17-
action[config.dataSource] = msg[config.dataSource];
17+
action[config.dataSource] = msg.payload[config.dataSource];
1818
msg.action = action;
1919
}
2020
}

0 commit comments

Comments
 (0)