Skip to content

Commit

Permalink
[Bug]: API Channel: mapped numeric IDs get lost when using fieldsets (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-matt-oetztal committed Nov 27, 2024
1 parent 8c0f31e commit 3cba0e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected function buildApiNodes(array $nodes, array $formData, array $mapping,
if ($hasChildren) {
$apiField = $hasParent ? $nodes : [];
if ($formField['type'] === 'fieldset' && count($apiMappingFields) === 0) {
$nodes = array_merge([], ...[$nodes, $this->buildApiNodes($apiField, $formData, $mapRow['children'], true, $formField['type'])]);
$nodes = array_replace([], ...[$nodes, $this->buildApiNodes($apiField, $formData, $mapRow['children'], true, $formField['type'])]);
} else {
foreach ($apiMappingFields as $apiMappingField) {
$nodes[$apiMappingField] = $this->buildApiNodes($apiField, $formData, $mapRow['children'], true, $formField['type']);
Expand Down

0 comments on commit 3cba0e5

Please sign in to comment.