Skip to content

Commit e0d9fc1

Browse files
committed
Fix suggest() failing when search term is empty
1 parent 8076887 commit e0d9fc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/php/de/thekid/dialog/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function entries(Pagination $pagination, int $page): array<Document> {
6969
}
7070

7171
/** Returns search suggestions */
72-
public function suggest(string $query, int $limit= 10): Cursor {
72+
public function suggest(string $query, int $limit= 10): iterable {
7373
if ('' === $query) return [];
7474

7575
// Rank a match on title with a hard factor of 5 along `suggest` and `boost`

0 commit comments

Comments
 (0)