diff --git a/src/Repository/BookRepository.php b/src/Repository/BookRepository.php index 427e5259..2500cbbc 100644 --- a/src/Repository/BookRepository.php +++ b/src/Repository/BookRepository.php @@ -140,7 +140,7 @@ private function convertResults(mixed $intermediateResults): array foreach ($intermediateResults as $result) { foreach ($result['item'] as $item) { $key = ucwords(strtolower($item), Book::UCWORDS_SEPARATORS); - if (!array_key_exists($item, $results)) { + if (!array_key_exists($key, $results)) { $results[$key] = [ 'item' => $key, 'bookCount' => 0,