Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/lib/search/mem_index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ class InMemoryPackageIndex {
}

PackageSearchResult search(ServiceSearchQuery query) {
// prevent any work if offset is outside of the range
if ((query.offset ?? 0) > _documents.length) {
return PackageSearchResult(
timestamp: clock.now(),
totalCount: 0,
packageHits: [],
);
}
return _scorePool.withScore(
value: 1.0,
fn: (score) {
Expand Down
Loading