+3
-2
@@ -87,4 +87,5 @@ "use strict"; | ||
| var runMessage = function (msg, pace, data) { | ||
| msg.botSays(data).map(function (message, i) { return runIn(pace * (i + 1))(function () { return addMessage({ message: message, isBot: true }); }); }); | ||
| runIn((msg.botSays.length) * pace)(function () { | ||
| var says = msg.botSays(data); | ||
| says.map(function (message, i) { return runIn(pace * (i + 1))(function () { return addMessage({ message: message, isBot: true }); }); }); | ||
| runIn((says.length) * pace)(function () { | ||
| exports.store.dispatch({ type: 'SET_CURRENT', payload: msg }); | ||
@@ -91,0 +92,0 @@ focusInput(); |
+1
-1
| { | ||
| "name": "tchatche", | ||
| "version": "1.0.2", | ||
| "version": "1.0.3", | ||
| "description": "Conversation bot framework", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
+3
-2
@@ -137,4 +137,5 @@ import { createStore } from 'redux' | ||
| const runMessage = (msg: BotMessage, pace: number, data: any) => { | ||
| msg.botSays(data).map((message, i) => runIn(pace * (i + 1))(() => addMessage({ message, isBot: true }))) | ||
| runIn((msg.botSays.length) * pace)(() => { | ||
| const says = msg.botSays(data) | ||
| says.map((message, i) => runIn(pace * (i + 1))(() => addMessage({ message, isBot: true }))) | ||
| runIn((says.length) * pace)(() => { | ||
| store.dispatch({ type: 'SET_CURRENT', payload: msg }) | ||
@@ -141,0 +142,0 @@ focusInput() |
33609
0.08%705
0.28%