Do not leave Mastodon when clicking “Back” (#23953)
This commit is contained in:
		
				
					committed by
					
						
						Claire
					
				
			
			
				
	
			
			
			
						parent
						
							4cec3ad9b8
						
					
				
				
					commit
					37a28ba203
				
			@@ -474,10 +474,10 @@ class UI extends React.PureComponent {
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  handleHotkeyBack = () => {
 | 
			
		||||
    if (window.history && window.history.length === 1) {
 | 
			
		||||
      this.context.router.history.push('/');
 | 
			
		||||
    } else {
 | 
			
		||||
    if (window.history && window.history.state) {
 | 
			
		||||
      this.context.router.history.goBack();
 | 
			
		||||
    } else {
 | 
			
		||||
      this.context.router.history.push('/');
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user