Skip to content

Commit cdbd253

Browse files
committed
avoid sending children infor as part of UI data from CategoryTreeNode DTO
1 parent 16ae021 commit cdbd253

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Data/CategoryTreeNode.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(
1919

2020
public function toUiArray(): array
2121
{
22-
return array_merge(
22+
$uiData = array_merge(
2323
get_object_vars($this),
2424
[
2525
'hasChildren' => $this->children !== [],
@@ -28,5 +28,9 @@ public function toUiArray(): array
2828
'parentsPath' => null,
2929
]
3030
);
31+
32+
unset($uiData['children']);
33+
34+
return $uiData;
3135
}
3236
}

0 commit comments

Comments
 (0)