mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-27 06:12:00 +01:00 
			
		
		
		
	Don't try to set page_type if not logged in
This commit is contained in:
		
							parent
							
								
									959c0f0669
								
							
						
					
					
						commit
						6fc910a259
					
				| @ -40,12 +40,19 @@ module.exports = { | ||||
|     }, | ||||
| 
 | ||||
|     getInitialState: function() { | ||||
|         return { | ||||
|         var s = { | ||||
|             logged_in: !!(MatrixClientPeg.get() && MatrixClientPeg.get().credentials), | ||||
|             ready: false, | ||||
|             page_type: MatrixClientPeg.get().getRooms().length ? this.PageTypes.RoomView : this.PageTypes.RoomDirectory, | ||||
|             aux_panel: null, | ||||
|         }; | ||||
|         if (s.logged_in) { | ||||
|             if (MatrixClientPeg.get().getRooms().length) { | ||||
|                 s.page_type = this.PageTypes.RoomView; | ||||
|             } else { | ||||
|                 s.page_type = this.PageTypes.RoomDirectory; | ||||
|             } | ||||
|         } | ||||
|         return s; | ||||
|     }, | ||||
| 
 | ||||
|     componentDidMount: function() { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user