mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 10:11:03 +01:00 
			
		
		
		
	Work around the bug where some channels have no name from the js sdk which was causing vector to exception and never load.
This commit is contained in:
		
							parent
							
								
									ff35e02b4d
								
							
						
					
					
						commit
						942659df0d
					
				@ -56,7 +56,8 @@ module.exports = React.createClass({
 | 
				
			|||||||
            name = this.props.room.getMember(MatrixClientPeg.get().credentials.userId).events.member.getSender();
 | 
					            name = this.props.room.getMember(MatrixClientPeg.get().credentials.userId).events.member.getSender();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
            name = this.props.room.name;
 | 
					            // XXX: We should never display raw room IDs, but sometimes the room name js sdk gives is undefined
 | 
				
			||||||
 | 
					            name = this.props.room.name || this.props.room.roomId;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon
 | 
					        name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user