Skip to content

Commit

Permalink
Merge pull request #12 from offerakrabi/offer_#105
Browse files Browse the repository at this point in the history
minor bug fix
  • Loading branch information
erezbi authored Dec 27, 2017
2 parents 60c36ea + ee58714 commit ec14c92
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions skill-sdk/lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function Response(callback) {

Response.prototype.say = function(text, selection = 'all') {
if (text instanceof Array) {
let res = text[0];
if (typeof selection === 'string') {
let res;
switch (selection) {
case 'random':
selection = Math.floor(Math.random() * text.length);
Expand All @@ -34,7 +34,6 @@ Response.prototype.say = function(text, selection = 'all') {
res = text.toString();
break;
default:
res = text[0];
break;
}
}
Expand Down

0 comments on commit ec14c92

Please sign in to comment.