Fix react warnings when a RR animation is happening during room switch
If the animation of an RR removal is active when we change room, we end up getting a callback after the RoomView has been unmounted. Guard against this to avoid getting React warnings.
This commit is contained in:
parent
20f77d1224
commit
3b1ed3a014
1 changed files with 1 additions and 1 deletions
|
@ -915,7 +915,7 @@ module.exports = React.createClass({
|
|||
var hr;
|
||||
hr = (<hr className="mx_RoomView_myReadMarker" style={{opacity: 1, width: '99%'}} ref={function(n) {
|
||||
Velocity(n, {opacity: '0', width: '10%'}, {duration: 400, easing: 'easeInSine', delay: 1000, complete: function() {
|
||||
self.setState({readMarkerGhostEventId: undefined});
|
||||
if (!self.unmounted) self.setState({readMarkerGhostEventId: undefined});
|
||||
}});
|
||||
}} />);
|
||||
ret.splice(ghostIndex, 0, (
|
||||
|
|
Loading…
Reference in a new issue