mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Use RED.util.getMessageProperty() to check message property
This commit is contained in:
parent
cb72d5100e
commit
89485971fa
@ -66,8 +66,9 @@ module.exports = function(RED) {
|
|||||||
// then prepend with the msg.payload
|
// then prepend with the msg.payload
|
||||||
var arg = node.cmd;
|
var arg = node.cmd;
|
||||||
if (node.addpay) {
|
if (node.addpay) {
|
||||||
if (msg.hasOwnProperty(node.addpayValue)) {
|
var value = RED.util.getMessageProperty(msg, node.addpayValue);
|
||||||
arg += " " + RED.util.getMessageProperty(msg, node.addpayValue);
|
if (value !== undefined) {
|
||||||
|
arg += " " + value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (node.append.trim() !== "") { arg += " " + node.append; }
|
if (node.append.trim() !== "") { arg += " " + node.append; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user