mirror of https://github.com/vector-im/riot-web
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.pull/21833/head
parent
20f77d1224
commit
3b1ed3a014
|
@ -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 New Issue