fix out of bounds issue when moving to another page
This commit is contained in:
@@ -184,7 +184,7 @@ public class RagfairController
|
||||
{
|
||||
var start = searchRequest.Page * searchRequest.Limit;
|
||||
var end = (int)Math.Min((double)((searchRequest.Page + 1) * searchRequest.Limit), result.Offers.Count);
|
||||
result.Offers = result.Offers.Slice(start.Value, end);
|
||||
result.Offers = result.Offers.Slice(start.Value, end - start.Value);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user