diff --git a/core/modules/media/src/MediaTypeForm.php b/core/modules/media/src/MediaTypeForm.php index 003dcfee53..5f38b20055 100644 --- a/core/modules/media/src/MediaTypeForm.php +++ b/core/modules/media/src/MediaTypeForm.php @@ -404,12 +404,7 @@ public function save(array $form, FormStateInterface $form_state) { * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException */ protected function isSourceChangeable() { - - if (!$this->entity->isNew() && (!$this->fieldMapEmpty() || !$this->hasOnlySourceField() || $this->entityCount())) { - return FALSE; - } - - return TRUE; + return $this->entity->isNew && ($this->fieldMapEmpty() || $this->hasOnlySourceField() || $this->entityCount() > 0); } /** @@ -434,7 +429,6 @@ protected function entityCount() { * If the source field is the only field. */ protected function hasOnlySourceField() { - // Make sure this is an existing media entity. if ($this->entity->isNew()) { return TRUE; }