core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php index 932c074..ff46e3e 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php @@ -180,10 +180,10 @@ public function buildForm(FieldableEntityInterface $entity, array &$form, FormSt $field_definition = $this->getFieldDefinition($name); if ($field_definition instanceof CacheableDependencyInterface) { $this->renderer->addDependency($form[$name], $field_definition); - $field_storage_definition = $field_definition->getFieldStorageDefinition(); - if ($field_storage_definition instanceof CacheableDependencyInterface) { - $this->renderer->addDependency($form[$name], $field_storage_definition); - } + } + $field_storage_definition = $field_definition->getFieldStorageDefinition(); + if ($field_storage_definition instanceof CacheableDependencyInterface) { + $this->renderer->addDependency($form[$name], $field_storage_definition); } } }