From 128e16bb3b480241f02ffb4ccca70b03deadc78e Mon Sep 17 00:00:00 2001 From: "erel.tapiero@biocatch.com" Date: Fri, 10 Apr 2020 12:53:58 +0300 Subject: [PATCH] Pass answer content when answer is func --- component/Bubbles.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/component/Bubbles.js b/component/Bubbles.js index 8a82e53..5060ea0 100644 --- a/component/Bubbles.js +++ b/component/Bubbles.js @@ -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) {