diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index 284ab1bb8..5481e78ac 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -76,7 +76,7 @@ def index query: params[:query], "member-id" => params[:provider_id], "data-center-id" => params[:client_id], - "page[cursor]" => Array.wrap(@dois.last[:sort]).first, + "page[cursor]" => page[:cursor].present? ? Array.wrap(@dois.last[:sort]).first : nil, "page[size]" => page[:size] }.compact.to_query }.compact options[:include] = @include