diff --git a/301-AWS.js b/301-AWS.js index 878cdafa..a9df8ea4 100644 --- a/301-AWS.js +++ b/301-AWS.js @@ -119,8 +119,12 @@ module.exports = function(RED) { if (typeof awsService[node.methods] == "function"){ node.status({fill:"blue",shape:"dot",text:node.methods}); - var paramValue = JSON.parse(mustache.render(node.params, new NodeContext(msg, node.context()))); - var request = awsService[node.methods](paramValue || msg.param, _cb); + if (node.params) { + const paramValue = JSON.parse(mustache.render(node.params, new NodeContext(msg, node.context()))); + awsService[node.methods](paramValue, _cb); + } else { + awsService[node.methods](msg.params, _cb); + } } else { node.error("failed: Invalid Operation - " + node.methods); } diff --git a/package.json b/package.json index 09e90e24..c24db357 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-samsung-automation-studio-nodes", - "version": "1.1.19", + "version": "1.1.20", "description": "Samsung Automation Studio Nodes for Node-RED", "keywords": [ "SmartThings",