mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Handle null from TimelinePanel.getScrollState in RoomView _getScrollState
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
359d2fee5f
commit
9e8234c98f
1 changed files with 2 additions and 1 deletions
|
@ -1417,7 +1417,8 @@ module.exports = createReactClass({
|
|||
|
||||
const scrollState = messagePanel.getScrollState();
|
||||
|
||||
if (scrollState.stuckAtBottom) {
|
||||
// getScrollState on TimelinePanel *may* return null, so guard against that
|
||||
if (!scrollState || scrollState.stuckAtBottom) {
|
||||
// we don't really expect to be in this state, but it will
|
||||
// occasionally happen when no scroll state has been set on the
|
||||
// messagePanel (ie, we didn't have an initial event (so it's
|
||||
|
|
Loading…
Reference in a new issue