->setTargetBundle($bundle);
// Notify the entity storage that our field is gone.
\Drupal::entityManager()->onFieldDefinitionDelete($field_definitions['custom_bundle_field']);
+ \Drupal::entityManager()->onFieldStorageDefinitionDelete($field_definitions['custom_bundle_field']);
}
}