We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eb9424b + c85ad1b commit a7c6223Copy full SHA for a7c6223
src/SelectTree.php
@@ -84,7 +84,9 @@ protected function setUp(): void
84
private function buildTree($parent = null): array|Collection
85
{
86
// Assign the parent's null value to the $parent variable if it's not null
87
- $parent = $this->getParentNullValue() ?? $parent;
+ if ($parent == null || $parent == $this->getParentNullValue()) {
88
+ $parent = $this->getParentNullValue() ?? $parent;
89
+ }
90
91
// Create a default query to retrieve related items.
92
$defaultQuery = $this->getRelationship()
0 commit comments