Check if room is defined
Sometimes it isn't and that leads to errors. We can't use ? here because we also use ! Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
							parent
							
								
									65ef2b845e
								
							
						
					
					
						commit
						f64008e239
					
				| 
						 | 
				
			
			@ -498,7 +498,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
 | 
			
		|||
 | 
			
		||||
                // We don't want to save if the room is a
 | 
			
		||||
                // space room since it can cause problems
 | 
			
		||||
                if (!room.isSpaceRoom()) {
 | 
			
		||||
                if (room && !room.isSpaceRoom()) {
 | 
			
		||||
                    const activeSpaceId = this.activeSpace?.roomId || LAST_VIEWED_ROOMS_HOME;
 | 
			
		||||
                    const lastViewedRooms = JSON.parse(window.localStorage.getItem(LAST_VIEWED_ROOMS)) || {};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue