Skip to content

Commit

Permalink
Fix error when images are NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Apr 28, 2024
1 parent 5559f01 commit fe0810a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/php/de/thekid/dialog/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function entries(Pagination $pagination, int $page, int $children= 6): ar
// If no preview images are set, aggregate children
['$lookup' => [
'from' => 'entries',
'let' => ['parent' => '$slug', 'images' => ['$size' => '$images']],
'let' => ['parent' => '$slug', 'images' => ['$size' => ['$ifNull' => ['$images', []]]]],
'pipeline' => [
['$match' => ['$expr' => ['$cond' => [
['$eq' => ['$$images', 0]],
Expand Down

0 comments on commit fe0810a

Please sign in to comment.