You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-10-31 01:45:39 +03:00 
			
		
		
		
	Pass room to getRoomTombstone to avoid racing with setState (#7986)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							6174b13142
						
					
				
				
					commit
					aa48cfd0a0
				
			| @@ -1028,13 +1028,13 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> { | ||||
|         this.checkWidgets(room); | ||||
|  | ||||
|         this.setState({ | ||||
|             tombstone: this.getRoomTombstone(), | ||||
|             tombstone: this.getRoomTombstone(room), | ||||
|             liveTimeline: room.getLiveTimeline(), | ||||
|         }); | ||||
|     }; | ||||
|  | ||||
|     private getRoomTombstone() { | ||||
|         return this.state.room?.currentState.getStateEvents(EventType.RoomTombstone, ""); | ||||
|     private getRoomTombstone(room = this.state.room) { | ||||
|         return room?.currentState.getStateEvents(EventType.RoomTombstone, ""); | ||||
|     } | ||||
|  | ||||
|     private async calculateRecommendedVersion(room: Room) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user