mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Remove redundant msg != null checks.
This commit is contained in:
@@ -44,15 +44,13 @@ module.exports = function(RED) {
|
||||
|
||||
if (mpc != null) {
|
||||
this.on("input", function(msg) {
|
||||
if (msg != null) {
|
||||
try {
|
||||
//node.mpc.command(msg.payload);
|
||||
node.mpc.command(msg.payload, msg.param, function(err, results) {
|
||||
if (err) { node.log("error: "+err); }
|
||||
//else { console.log(results); }
|
||||
});
|
||||
} catch (err) { node.log("error: "+err); }
|
||||
}
|
||||
try {
|
||||
//node.mpc.command(msg.payload);
|
||||
node.mpc.command(msg.payload, msg.param, function(err, results) {
|
||||
if (err) { node.log("error: "+err); }
|
||||
//else { console.log(results); }
|
||||
});
|
||||
} catch (err) { node.log("error: "+err); }
|
||||
});
|
||||
|
||||
node.mpc.on('error', function(err) {
|
||||
|
Reference in New Issue
Block a user