- $field = $this->get($field_name);
- // When saving entities in the user interface, the changed timestamp is
- // automatically incremented by ContentEntityForm::submitForm() even if
- // nothing was actually changed. Thus, the changed time needs to be
- // ignored when determining whether there are any actual changes in the
- // entity.
- if (!($field instanceof ChangedFieldItemList) && !$definition->isComputed()) {
- $items = $field->filterEmptyItems();
- $original_items = $translation->get($field_name)->filterEmptyItems();
- if (!$items->equals($original_items)) {
- return TRUE;
- }
+ $items = $this->get($field_name)->filterEmptyItems();
+ $original_items = $translation->get($field_name)->filterEmptyItems();
+ if ($items->hasAffectingChanges($original_items, $langcode)) {
+ return TRUE;