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
2 changes: 1 addition & 1 deletion src/SelectTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ private function buildTreeFromResults($results, $parent = null): Collection
// If the tree has strict rull parent root nodes, only retrieve children whose parent is the null value
// Otherwise, promote other orphaned children to root nodes
$orphanedResults = $this->hasStrictNullParentRootNodes()
? [$parent => $resultCache[$parent]['children']]
? [$parent => $resultCache[$parent]['children'] ?? []]
: array_map(
fn ($item) => $item['children'],
array_filter(
Expand Down