Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
fixed possible bug if inverted={false} prop is provided.

The bug produces `cannot read property scrollToEnd of null`
  • Loading branch information
myckhel authored and xcarpentier committed Dec 3, 2019
1 parent e594b99 commit 1c554cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MessageContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export default class MessageContainer<
this.props.messages!.length
) {
setTimeout(
() => this.scrollToBottom(false),
() => this.scrollToBottom && this.scrollToBottom(false),
15 * this.props.messages!.length,
)
}
Expand Down

0 comments on commit 1c554cd

Please sign in to comment.