Skip to content

Commit

Permalink
Added fallback for cases when base value is not set for nontranslatab…
Browse files Browse the repository at this point in the history
…le fields in ContentUpdateMapper (#73)
  • Loading branch information
webhdx committed Aug 16, 2023
1 parent ffeaa4d commit 9c4585b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/Data/Mapper/ContentUpdateMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function mapToFormData(ValueObject $contentDraft, array $params = [])
$data->addFieldData(new FieldData([
'fieldDefinition' => $fieldDef,
'field' => $field,
'value' => $isNonTranslatable
'value' => $isNonTranslatable && isset($mappedCurrentFields[$fieldDef->identifier])
? $mappedCurrentFields[$fieldDef->identifier]->value
: $field->value,
]));
Expand Down

0 comments on commit 9c4585b

Please sign in to comment.