Skip to content

Commit

Permalink
Merge pull request #75 from ereltapiro/pass_answer_content
Browse files Browse the repository at this point in the history
Pass answer content when the answer is func
  • Loading branch information
dmitrizzle authored Apr 18, 2020
2 parents 83502f8 + 128e16b commit c770d1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions component/Bubbles.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ function Bubbles(container, self, options) {
}
// navigate "answers"
this.answer = function(key, content) {
var func = function(key) {
typeof window[key] === "function" ? window[key]() : false
var func = function(key, content) {
typeof window[key] === "function" ? window[key](content) : false
}
_convo[key] !== undefined
? (this.reply(_convo[key]), (standingAnswer = key))
: func(key)
: func(key, content)

// add re-generated user picks to the history stack
if (_convo[key] !== undefined && content !== undefined) {
Expand Down

0 comments on commit c770d1a

Please sign in to comment.