mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Redirect to home page on empty search
This commit is contained in:
parent
0832fa9bdb
commit
2fdf3d24e3
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue