Skip to content

Commit 201618c

Browse files
committed
add v0.4.1
1 parent 78a46da commit 201618c

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

dist/react-simple-chatbot.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ChatBot.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ class ChatBot extends Component {
663663
height={height}
664664
hideInput={currentStep.hideInput}
665665
>
666-
{Object.values(renderedSteps).map(this.renderStep)}
666+
{renderedSteps.map(this.renderStep)}
667667
</Content>
668668
<Footer className="rsc-footer" style={footerStyle}>
669669
{

lib/steps_components/text/TextStep.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TextStep extends Component {
3636
const { previousValue, step } = this.props;
3737
const { message } = step;
3838

39-
return message.replace(/{previousValue}/g, previousValue);
39+
return message ? message.replace(/{previousValue}/g, previousValue) : '';
4040
}
4141

4242
renderMessage = () => {
@@ -99,8 +99,7 @@ class TextStep extends Component {
9999
isFirst={isFirst}
100100
isLast={isLast}
101101
>
102-
{loading && <Loading />}
103-
{!loading && this.renderMessage()}
102+
{loading ? <Loading /> : this.renderMessage()}
104103
</Bubble>
105104
</TextStepContainer>
106105
);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-simple-chatbot",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "React Simple Chatbot",
55
"main": "dist/react-simple-chatbot.js",
66
"scripts": {

0 commit comments

Comments
 (0)