Skip to content

Commit 1898809

Browse files
committed
fix: do not send an empty array of childs on the tree (global namespace that has functions for example)
1 parent b75ca03 commit 1898809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TreeNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(
5151
#[\ReturnTypeWillChange]
5252
public function jsonSerialize()
5353
{
54-
if ($this->children === null) {
54+
if ($this->children === null || $this->children === []) {
5555
return [
5656
'l' => $this->level,
5757
'n' => $this->name,

0 commit comments

Comments
 (0)