Skip to content

Commit

Permalink
field-delete: Fix field being deleted from all bundles instead of onl…
Browse files Browse the repository at this point in the history
…y the requested bundle (#5158)
  • Loading branch information
DieterHolvoet committed Jun 15, 2022
1 parent eb71b82 commit 5f512b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Drupal/Commands/field/FieldDeleteCommands.php
Expand Up @@ -147,9 +147,9 @@ protected function deleteFieldConfig(FieldConfigInterface $fieldConfig): void
if ($fieldStorage && !$fieldStorage->isLocked()) {
$fieldConfig->delete();

// If there is only one bundle left for this field storage, it will be
// If there are no bundles left for this field storage, it will be
// deleted too, notify the user about dependencies.
if (count($fieldStorage->getBundles()) <= 1) {
if ($fieldStorage->getBundles() === []) {
$fieldStorage->delete();
}

Expand Down

0 comments on commit 5f512b9

Please sign in to comment.