mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-11-04 06:31:57 +00:00 
			
		
		
		
	Redirect to home page on empty search
This commit is contained in:
		@@ -588,6 +588,10 @@ get "/search" do |env|
 | 
			
		||||
  query ||= env.params.query["q"]?
 | 
			
		||||
  query ||= ""
 | 
			
		||||
 | 
			
		||||
  if query.empty?
 | 
			
		||||
    next env.redirect "/"
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  page = env.params.query["page"]?.try &.to_i?
 | 
			
		||||
  page ||= 1
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user