mirror of https://github.com/vector-im/riot-web
Don't crash if scrollbars updated before init
The initialisation here is done on a timer to allow the DOM elements to be in place before it's run, so it's possible for an update to happen ebfore the initialisation. Stop & bail out if there is no this.stickies.pull/21833/head
parent
16b7763c0e
commit
05bf200a72
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright 2015, 2016 OpenMarket Ltd
|
||||
Copyright 2017 Vector Creations Ltd
|
||||
Copyright 2017, 2018 Vector Creations Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -451,6 +451,8 @@ module.exports = React.createClass({
|
|||
}
|
||||
}
|
||||
|
||||
if (!this.stickies) return;
|
||||
|
||||
const self = this;
|
||||
let scrollStuckOffset = 0;
|
||||
// Scroll to the passed in position, i.e. a header was clicked and in a scroll to state
|
||||
|
|
Loading…
Reference in New Issue