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.
This commit is contained in:
parent
16b7763c0e
commit
05bf200a72
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2015, 2016 OpenMarket Ltd
|
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");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with 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;
|
const self = this;
|
||||||
let scrollStuckOffset = 0;
|
let scrollStuckOffset = 0;
|
||||||
// Scroll to the passed in position, i.e. a header was clicked and in a scroll to state
|
// Scroll to the passed in position, i.e. a header was clicked and in a scroll to state
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue