diff --git a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php index fc64fc2469..3b0a8ad8d9 100644 --- a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php +++ b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php @@ -252,8 +252,7 @@ public function patch(EntityInterface $original_entity, EntityInterface $entity $original_entity->set($field_name, $field->getValue()); } } - - if ($entity instanceof ConfigEntityInterface && $original_entity instanceof ConfigEntityInterface) { + elseif ($entity instanceof ConfigEntityInterface && $original_entity instanceof ConfigEntityInterface) { foreach ($entity->_restSubmittedFields as $field_name) { $original_entity->set($field_name, $entity->get($field_name)); }