mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
catch weird pages, set to 1
This commit is contained in:
parent
3e6422bb24
commit
7d43dbae19
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,12 @@
|
|||
get '/browse/?' do
|
||||
@surfmode = false
|
||||
@page = params[:page].to_i
|
||||
|
||||
begin
|
||||
@page = params[:page].to_i
|
||||
rescue
|
||||
@page = 1
|
||||
end
|
||||
|
||||
@page = 1 if @page == 0
|
||||
|
||||
params.delete 'tag' if params[:tag].nil? || params[:tag].strip.empty?
|
||||
|
|
Loading…
Add table
Reference in a new issue