Skip to content

Commit 7224e12

Browse files
authored
Merge pull request #137 from ylecleach/master
fix bug in verifyInputs
2 parents cc9062b + d54c7b6 commit 7224e12

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

services/conversation/v1-exp.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ module.exports = function (RED) {
4242
function verifyInputs(node, msg, config) {
4343
// workspaceid can be either configured in the node,
4444
// or sent into msg.params.workspace_id
45-
if (!config.workspaceid || config.workspaceid !== '') {
45+
if (config.workspaceid && config.workspaceid) {
4646
node.workspaceid = config.workspaceid;
47+
console.log('node.workspaceid', node.workspaceid);
4748
return true;
48-
} else if (!msg.params || msg.params.workspace_id !== '') {
49+
}
50+
if (msg.params && msg.params.workspace_id) {
4951
node.workspaceid = msg.params.workspace_id;
52+
console.log('node.workspaceid', node.workspaceid);
5053
return true;
5154
}
5255
node.error('Missing workspace_id. check node documentation.',msg);

0 commit comments

Comments
 (0)