mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 02:02:14 +01:00 
			
		
		
		
	Don't crash if the value of a room tag is null
We were checking that the order was not null, but not the object itself.
This commit is contained in:
		
							parent
							
								
									aecddd58cc
								
							
						
					
					
						commit
						e3afbb157d
					
				@ -284,8 +284,8 @@ class RoomListStore extends Store {
 | 
				
			|||||||
            if (optimisticRequest && roomB === optimisticRequest.room) metaB = optimisticRequest.metaData;
 | 
					            if (optimisticRequest && roomB === optimisticRequest.room) metaB = optimisticRequest.metaData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Make sure the room tag has an order element, if not set it to be the bottom
 | 
					            // Make sure the room tag has an order element, if not set it to be the bottom
 | 
				
			||||||
            const a = metaA.order;
 | 
					            const a = metaA ? metaA.order : undefined;
 | 
				
			||||||
            const b = metaB.order;
 | 
					            const b = metaB ? metaB.order : undefined;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Order undefined room tag orders to the bottom
 | 
					            // Order undefined room tag orders to the bottom
 | 
				
			||||||
            if (a === undefined && b !== undefined) {
 | 
					            if (a === undefined && b !== undefined) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user