Skip to content

Commit

Permalink
Merge pull request #137 from ylecleach/master
Browse files Browse the repository at this point in the history
fix bug in verifyInputs
  • Loading branch information
chughts authored Jun 17, 2016
2 parents cc9062b + d54c7b6 commit 7224e12
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions services/conversation/v1-exp.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ module.exports = function (RED) {
function verifyInputs(node, msg, config) {
// workspaceid can be either configured in the node,
// or sent into msg.params.workspace_id
if (!config.workspaceid || config.workspaceid !== '') {
if (config.workspaceid && config.workspaceid) {
node.workspaceid = config.workspaceid;
console.log('node.workspaceid', node.workspaceid);
return true;
} else if (!msg.params || msg.params.workspace_id !== '') {
}
if (msg.params && msg.params.workspace_id) {
node.workspaceid = msg.params.workspace_id;
console.log('node.workspaceid', node.workspaceid);
return true;
}
node.error('Missing workspace_id. check node documentation.',msg);
Expand Down

0 comments on commit 7224e12

Please sign in to comment.