Skip to content

Commit c9194d3

Browse files
committed
Fix: The Params property of the AWS SDK node did not work as described as optional.
1 parent faf95a9 commit c9194d3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

301-AWS.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,12 @@ module.exports = function(RED) {
119119
if (typeof awsService[node.methods] == "function"){
120120
node.status({fill:"blue",shape:"dot",text:node.methods});
121121

122-
var paramValue = JSON.parse(mustache.render(node.params, new NodeContext(msg, node.context())));
123-
var request = awsService[node.methods](paramValue || msg.param, _cb);
122+
if (node.params) {
123+
const paramValue = JSON.parse(mustache.render(node.params, new NodeContext(msg, node.context())));
124+
awsService[node.methods](paramValue, _cb);
125+
} else {
126+
awsService[node.methods](msg.params, _cb);
127+
}
124128
} else {
125129
node.error("failed: Invalid Operation - " + node.methods);
126130
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-contrib-samsung-automation-studio-nodes",
3-
"version": "1.1.19",
3+
"version": "1.1.20",
44
"description": "Samsung Automation Studio Nodes for Node-RED",
55
"keywords": [
66
"SmartThings",

0 commit comments

Comments
 (0)